cfg_timer_a_smclk_b_aclk.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Otto-von-Guericke-Universität Magdeburg
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
22 #include "periph_cpu.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
35 static const timer_conf_t timer_conf[] = {
36  {
37  .timer = &TIMER_A,
38  .irq_flags = &TIMER_A_IRQFLAGS,
39  .clock_source = TIMER_CLOCK_SOURCE_SUBMAIN_CLOCK,
40  },
41  {
42  .timer = &TIMER_B,
43  .irq_flags = &TIMER_B_IRQFLAGS,
44  .clock_source = TIMER_CLOCK_SOURCE_AUXILIARY_CLOCK,
45  }
46 };
47 #define TIMER_NUMOF ARRAY_SIZE(timer_conf)
49 #define TIMER0_ISR_CC0 (TIMERA0_VECTOR)
50 #define TIMER0_ISR_CCX (TIMERA1_VECTOR)
51 #define TIMER1_ISR_CC0 (TIMERB0_VECTOR)
52 #define TIMER1_ISR_CCX (TIMERB1_VECTOR)
55 #ifdef __cplusplus
56 }
57 #endif
58 
static const timer_conf_t timer_conf[]
Timer configuration.
msp430_timer_t TIMER_A
Register map of the timer A control registers.
msp430_timer_t TIMER_B
Register map of the timer B control registers.
REG16 TIMER_B_IRQFLAGS
IRQ flags for TIMER_B.
REG16 TIMER_A_IRQFLAGS
IRQ flags for TIMER_A.
@ TIMER_CLOCK_SOURCE_AUXILIARY_CLOCK
Auxiliary clock as clock source.
@ TIMER_CLOCK_SOURCE_SUBMAIN_CLOCK
Sub-system master clock as clock source.
Timer device configuration.
Definition: periph_cpu.h:263
timer_dev_t timer
the higher numbered timer
Definition: periph_cpu.h:556