diff options
author | Keith Packard <keithp@keithp.com> | 2012-04-17 11:01:18 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-04-17 11:01:18 -0700 |
commit | 1489263b895a2a825e29d0560c9b1dbba8a3f431 (patch) | |
tree | ac77be0da392ca7a130fa24a6ce050c48022f116 /src/stm/stm32l.h | |
parent | cc305ea231ae22278abf91c0d9925f5992945369 (diff) |
altos: Starting to write cc1120 driver
This does "something" in radio test mode, appearing to generate a
730MHz signal.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/stm32l.h')
-rw-r--r-- | src/stm/stm32l.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/stm/stm32l.h b/src/stm/stm32l.h index e884ef04..10a53a47 100644 --- a/src/stm/stm32l.h +++ b/src/stm/stm32l.h @@ -101,13 +101,13 @@ stm_ospeedr_get(struct stm_gpio *gpio, int pin) { #define STM_PUPDR_RESERVED 3 static inline void -stm_pupdr_set(struct stm_gpio *gpio, int pin, vuint32_t value) { +stm_pupdr_set(struct stm_gpio *gpio, int pin, uint32_t value) { gpio->pupdr = ((gpio->pupdr & ~(STM_PUPDR_MASK << STM_PUPDR_SHIFT(pin))) | value << STM_PUPDR_SHIFT(pin)); } -static inline vuint32_t +static inline uint32_t stm_pupdr_get(struct stm_gpio *gpio, int pin) { return (gpio->pupdr >> STM_PUPDR_SHIFT(pin)) & STM_PUPDR_MASK; } @@ -1589,4 +1589,16 @@ union stm_usb_bdt { extern uint8_t stm_usb_sram[]; +struct stm_exti { + vuint32_t imr; + vuint32_t emr; + vuint32_t rtsr; + vuint32_t ftsr; + + vuint32_t swier; + vuint32_t pr; +}; + +extern struct stm_exti stm_exti; + #endif /* _STM32L_H_ */ |