projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add internal flash driver for sam3x.
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
gpio_stm32.h
diff --git
a/bertos/cpu/cortex-m3/drv/gpio_stm32.h
b/bertos/cpu/cortex-m3/drv/gpio_stm32.h
index 1314bfdb5cf0f18d01ba5611143094e6e00178d2..17be2f56cc048030ee90ac967e33caaac054c972 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/gpio_stm32.h
+++ b/
bertos/cpu/cortex-m3/drv/gpio_stm32.h
@@
-74,7
+74,7
@@
enum
* \param pins mask of pins that we want set or clear
* \param val true to set selected pins of false to clear they.
*/
* \param pins mask of pins that we want set or clear
* \param val true to set selected pins of false to clear they.
*/
-INLINE void stm32_gpioPinWrite(struct stm32_gpio *base, uint
32
_t pins, bool val)
+INLINE void stm32_gpioPinWrite(struct stm32_gpio *base, uint
16
_t pins, bool val)
{
if (val)
base->BSRR |= pins;
{
if (val)
base->BSRR |= pins;
@@
-88,9
+88,9
@@
INLINE void stm32_gpioPinWrite(struct stm32_gpio *base, uint32_t pins, bool val)
* \param base gpio register address
* \param pins mask of pins that we want read
*/
* \param base gpio register address
* \param pins mask of pins that we want read
*/
-INLINE uint
8_t stm32_gpioPinRead(struct stm32_gpio *base, uint32
_t pins)
+INLINE uint
16_t stm32_gpioPinRead(struct stm32_gpio *base, uint16
_t pins)
{
{
- return
!!
(base->IDR & pins);
+ return (base->IDR & pins);
}
/**
}
/**