altos: Oopsed the STM DMA channels for I2C1
[fw/altos] / src / stm / stm32l.h
index e884ef04a8812e8f5af73daefc9e3f21ebfd5435..0bc7483e6ef93429736b23cc0ae817e71d42ef21 100644 (file)
@@ -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;
 }
@@ -953,8 +953,8 @@ extern struct stm_dma stm_dma;
 #define STM_DMA_CHANNEL_USART2_TX      7
 #define STM_DMA_CHANNEL_I2C2_TX                4
 #define STM_DMA_CHANNEL_I2C2_RX                5
-#define STM_DMA_CHANNEL_I2C1_RX                6
-#define STM_DMA_CHANNEL_I2C1_TX                7
+#define STM_DMA_CHANNEL_I2C1_TX                6
+#define STM_DMA_CHANNEL_I2C1_RX                7
 #define STM_DMA_CHANNEL_TIM2_CH3       1
 #define STM_DMA_CHANNEL_TIM2_UP                2
 #define STM_DMA_CHANNEL_TIM2_CH1       5
@@ -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_ */