1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

boards/slstk3402a: add TIMER0 as second timer

This moves LETIMER0 to index 2.
This commit is contained in:
Bas Stottelaar 2020-10-28 20:48:07 +01:00
parent 141c12f4ea
commit d15e4396aa
2 changed files with 19 additions and 8 deletions

View File

@ -37,7 +37,7 @@ extern "C" {
* @{
*/
#if IS_ACTIVE(CONFIG_EFM32_XTIMER_USE_LETIMER)
#define XTIMER_DEV (TIMER_DEV(1))
#define XTIMER_DEV (TIMER_DEV(2))
#define XTIMER_HZ (32768UL)
#define XTIMER_WIDTH (16)
#else

View File

@ -132,8 +132,7 @@ static const spi_dev_t spi_config[] = {
/**
* @name Timer configuration
*
* The implementation can use one low-energy timer
* or two regular timers in cascade mode.
* The implementation uses two timers in cascade mode.
* @{
*/
static const timer_conf_t timer_config[] = {
@ -147,7 +146,19 @@ static const timer_conf_t timer_config[] = {
.cmu = cmuClock_WTIMER1
},
.irq = WTIMER1_IRQn,
.channel_numof = 3
.channel_numof = 4
},
{
.prescaler = {
.dev = TIMER0,
.cmu = cmuClock_TIMER0
},
.timer = {
.dev = TIMER1,
.cmu = cmuClock_TIMER1
},
.irq = TIMER1_IRQn,
.channel_numof = 4
},
{
.prescaler = {
@ -160,13 +171,13 @@ static const timer_conf_t timer_config[] = {
},
.irq = LETIMER0_IRQn,
.channel_numof = 2
},
}
};
#define TIMER_0_ISR isr_wtimer1
#define TIMER_1_ISR isr_letimer0
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
#define TIMER_0_ISR isr_wtimer1
#define TIMER_1_ISR isr_timer1
#define TIMER_2_ISR isr_letimer0
/** @} */
/**