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

Merge pull request #20571 from maribu/cpu/msp430/timer

cpu/msp430/periph_timer: add a static_assert() for clear mask
This commit is contained in:
Marian Buschsieweke 2024-04-15 10:21:52 +00:00 committed by GitHub
commit 53edb4e981
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,7 +97,12 @@ int timer_init(tim_t dev, uint32_t freq, timer_cb_t cb, void *arg)
assume((unsigned)dev < TIMER_NUMOF);
msp430_timer_t *msptimer = timer_conf[dev].timer;
/* reset the timer A configuration */
static_assert(TACLR == TBCLR, "This driver assumes TIMER A and TIMER B "
"having the same register layout for the "
"features exposed by this driver. This "
"is backed by the datasheet for both "
"MSP430 x1xx and G2xx / F2xx MCUs.");
/* reset the timer configuration */
msptimer->CTL = TACLR;
/* save callback */
isr_ctx[dev].cb = cb;