diff --git a/src/driver/resource.h b/src/driver/resource.h index b24594600..d7499f783 100644 --- a/src/driver/resource.h +++ b/src/driver/resource.h @@ -29,8 +29,8 @@ typedef uint32_t resource_tag_t; #define RESOURCE_TAG_TYPE(tag) (resource_type_t)(((tag) >> 24) & 0xFF) #define TIMER_TAG(tim, ch) RESOURCE_TAG(RESOURCE_TIM, (uint32_t)((tim) << 8) | (ch)) -#define TIMER_TAG_TIM(tag) (uint8_t)(((tag) >> 8) & 0xFF) -#define TIMER_TAG_CH(tag) (uint8_t)((tag)&0xFF) +#define TIMER_TAG_TIM(tag) (timer_index_t)(((tag) >> 8) & 0xFF) +#define TIMER_TAG_CH(tag) (timer_channel_t)((tag) & 0xFF) #define SPI_TAG(port, pin) RESOURCE_TAG(RESOURCE_SPI, (uint32_t)((port) << 8) | (pin)) #define SPI_TAG_PORT(tag) (uint8_t)(((tag) >> 8) & 0xFF) @@ -41,5 +41,5 @@ typedef uint32_t resource_tag_t; #define SERIAL_TAG_PIN(tag) (uint8_t)((tag)&0xFF) #define ADC_TAG(adc, ch) RESOURCE_TAG(RESOURCE_ADC, (uint32_t)((adc) << 8) | (ch)) -#define ADC_TAG_DEV(tag) (uint8_t)(((tag) >> 8) & 0xFF) +#define ADC_TAG_DEV(tag) (adc_devices_t)(((tag) >> 8) & 0xFF) #define ADC_TAG_CH(tag) (uint8_t)((tag)&0xFF) \ No newline at end of file