diff options
author | Karl Palsson <karlp@tweak.net.au> | 2022-01-28 12:35:29 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2022-04-16 21:37:28 +0200 |
commit | 28ef4344180ddaded1142577dc5214b0f9d18f0a (patch) | |
tree | a9a313ef9b23e9d499ec13f4d24146ae8d637323 | |
parent | d010caa44f8849f21b21b3941f61e5c9a98b3d60 (diff) |
timer: add LPTIM definitions
Add them to the stm32wb platform as well.
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
-rw-r--r-- | platforms/stm32/wb.yaml | 6 | ||||
-rw-r--r-- | timer/stm32_timer.h | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/platforms/stm32/wb.yaml b/platforms/stm32/wb.yaml index 81005f4..bbd3a2d 100644 --- a/platforms/stm32/wb.yaml +++ b/platforms/stm32/wb.yaml @@ -94,6 +94,12 @@ offset: 0x40014400 TIM17: offset: 0x40014800 + LPTIM1: + type: lpv1 + offset: 0x40007c00 + LPTIM2: + type: lpv1 + offset: 0x40009400 stm32_uart: USART1: diff --git a/timer/stm32_timer.h b/timer/stm32_timer.h index 97436e6..f55b09c 100644 --- a/timer/stm32_timer.h +++ b/timer/stm32_timer.h @@ -31,6 +31,18 @@ struct STM32_TIMER_reg_v1_t { volatile uint32_t TISEL; }; +struct STM32_TIMER_reg_lpv1_t { + volatile uint32_t ISR; + volatile uint32_t ICR; + volatile uint32_t IER; + volatile uint32_t CFGR; + volatile uint32_t CR; + volatile uint32_t CMP; + volatile uint32_t ARR; + volatile uint32_t CNT; + volatile uint32_t OR; +}; + template <typename T> class STM32_TIMER_t : public mmio_ptr<T> { public: |