projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altos/stm: remove ao_dma_abort
[fw/altos]
/
src
/
stm
/
stm32l.h
diff --git
a/src/stm/stm32l.h
b/src/stm/stm32l.h
index 01afedc625bc0b66fe4c07798237903019e5f2a9..0b6b27983d6a3633d891be36bfdd0f0ecb3063fe 100644
(file)
--- a/
src/stm/stm32l.h
+++ b/
src/stm/stm32l.h
@@
-166,6
+166,16
@@
stm_gpio_set(struct stm_gpio *gpio, int pin, uint8_t value) {
gpio->bsrr = ((uint32_t) (value ^ 1) << (pin + 16)) | ((uint32_t) value << pin);
}
gpio->bsrr = ((uint32_t) (value ^ 1) << (pin + 16)) | ((uint32_t) value << pin);
}
+static inline void
+stm_gpio_set_bits(struct stm_gpio *gpio, uint16_t bits) {
+ gpio->bsrr = bits;
+}
+
+static inline void
+stm_gpio_clr_bits(struct stm_gpio *gpio, uint16_t bits) {
+ gpio->bsrr = ((uint32_t) bits) << 16;
+}
+
static inline uint8_t
stm_gpio_get(struct stm_gpio *gpio, int pin) {
return (gpio->idr >> pin) & 1;
static inline uint8_t
stm_gpio_get(struct stm_gpio *gpio, int pin) {
return (gpio->idr >> pin) & 1;