Start to extract generic interface from the sd driver implementation.
[bertos.git] / bertos / cpu / cortex-m3 / drv / gpio_stm32.h
index 1314bfdb5cf0f18d01ba5611143094e6e00178d2..17be2f56cc048030ee90ac967e33caaac054c972 100644 (file)
@@ -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.
  */
-INLINE void stm32_gpioPinWrite(struct stm32_gpio *base, uint32_t pins, bool val)
+INLINE void stm32_gpioPinWrite(struct stm32_gpio *base, uint16_t pins, bool val)
 {
        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
  */
-INLINE uint8_t stm32_gpioPinRead(struct stm32_gpio *base, uint32_t pins)
+INLINE uint16_t stm32_gpioPinRead(struct stm32_gpio *base, uint16_t pins)
 {
-       return !!(base->IDR & pins);
+       return (base->IDR & pins);
 }
 
 /**