X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fio%2Fstm32.h;h=9c2fe1df610bc4abdbdf6ae34c9eea22dac48734;hb=6b88c2593ab913484e8b8f88fd65a23831acf4fe;hp=b41b5c7602a2ecbe8bf0676050e52dc2be3d98e0;hpb=6782cd93ae622b7e2a603ce069ceb84c5eb448b9;p=bertos.git diff --git a/bertos/cpu/cortex-m3/io/stm32.h b/bertos/cpu/cortex-m3/io/stm32.h index b41b5c76..9c2fe1df 100644 --- a/bertos/cpu/cortex-m3/io/stm32.h +++ b/bertos/cpu/cortex-m3/io/stm32.h @@ -51,17 +51,30 @@ #include "stm32_i2c.h" #include "stm32_flash.h" -#define GPIO_USART1_TX_PIN BV(9) -#define GPIO_USART1_RX_PIN BV(10) -#define GPIO_USART2_TX_PIN BV(2) -#define GPIO_USART2_RX_PIN BV(3) -#define GPIO_USART3_TX_PIN BV(10) -#define GPIO_USART3_RX_PIN BV(11) +#if CPU_CM3_STM32F103RB + #define GPIO_USART1_TX_PIN BV(9) + #define GPIO_USART1_RX_PIN BV(10) + #define GPIO_USART2_TX_PIN BV(2) + #define GPIO_USART2_RX_PIN BV(3) + #define GPIO_USART3_TX_PIN BV(10) + #define GPIO_USART3_RX_PIN BV(11) +#else + #error No USART pins are defined for select cpu +#endif +#if CPU_CM3_STM32F103RB + #define GPIO_I2C1_SCL_PIN BV(6) + #define GPIO_I2C1_SDA_PIN BV(7) + #define GPIO_I2C2_SCL_PIN BV(10) + #define GPIO_I2C2_SDA_PIN BV(11) +#else + #error No i2c pins are defined for select cpu +#endif -#define GPIO_I2C1_SCL_PIN BV(6) -#define GPIO_I2C1_SDA_PIN BV(7) -#define GPIO_I2C2_SCL_PIN BV(10) -#define GPIO_I2C2_SDA_PIN BV(11) +#if CPU_CM3_STM32F103RB + #define FLASH_PAGE_SIZE 1024 +#else + #error No embedded definition for select cpu +#endif #endif /* STM32_H */