mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
io timer: remove some fields from io_timers_t and split out channel indexes
- reduces amount of board configuration required - removes the cyclic dependency between io_timers_t and timer_io_channels_t Fixes a bug in the fmuk66-v3 config: the 2. timer has 3 channels associated not 2. Fixes a bug in the modelai config: the 2. timer has 4 channels associated.
This commit is contained in:
@@ -65,9 +65,6 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.clock_register = STM32_RCC_APB1ENR,
|
||||
.clock_bit = RCC_APB1ENR_TIM2EN,
|
||||
.clock_freq = TIM2_CLKIN,
|
||||
.first_channel_index = 0,
|
||||
.last_channel_index = 2,
|
||||
.handler = io_timer_handler0,
|
||||
.vectorno = STM32_IRQ_TIM2,
|
||||
},
|
||||
{
|
||||
@@ -75,12 +72,21 @@ __EXPORT const io_timers_t io_timers[MAX_IO_TIMERS] = {
|
||||
.clock_register = STM32_RCC_APB1ENR,
|
||||
.clock_bit = RCC_APB1ENR_TIM4EN,
|
||||
.clock_freq = TIM4_CLKIN,
|
||||
.first_channel_index = 3,
|
||||
.last_channel_index = 3,
|
||||
.handler = io_timer_handler1,
|
||||
.vectorno = STM32_IRQ_TIM4,
|
||||
}
|
||||
};
|
||||
__EXPORT const io_timers_channel_mapping_t io_timers_channel_mapping = {
|
||||
.element = {
|
||||
{
|
||||
.first_channel_index = 0,
|
||||
.channel_count = 3,
|
||||
},
|
||||
{
|
||||
.first_channel_index = 3,
|
||||
.channel_count = 1,
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
__EXPORT const timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = {
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user