#define GPIO_USART1_RX_PIN BV(10)
#define GPIO_USART2_TX_PIN BV(2)
#define GPIO_USART2_RX_PIN BV(3)
-#elif CPU_CM3_STM32F103RB || CPU_CM3_STM32F103RE || CPU_CM3_STM32F100RB
+#elif CPU_CM3_STM32F103RB || CPU_CM3_STM32F103RE || CPU_CM3_STM32F100RB || CPU_CM3_STM32F102C4
#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_STM32F102C4
+ #define GPIO_USART3_RTS_PIN BV(14)
+ #define GPIO_USART3_CTS_PIN BV(13)
+ #define GPIO_USART3_RING_PIN BV(15)
+#endif
#else
#error No USART pins are defined for select cpu
#endif
#if CPU_CM3_STM32F101C4
#define GPIO_I2C1_SCL_PIN BV(6)
#define GPIO_I2C1_SDA_PIN BV(7)
-#elif CPU_CM3_STM32F103RB || CPU_CM3_STM32F103RE || CPU_CM3_STM32F100RB
+#elif CPU_CM3_STM32F103RB || CPU_CM3_STM32F103RE || CPU_CM3_STM32F100RB || CPU_CM3_STM32F102C4
#define GPIO_I2C1_SCL_PIN BV(6)
#define GPIO_I2C1_SDA_PIN BV(7)
#define GPIO_I2C2_SCL_PIN BV(10)
#error No i2c pins are defined for select cpu
#endif
-#if CPU_CM3_STM32F101C4 || CPU_CM3_STM32F103RB || CPU_CM3_STM32F103RE || CPU_CM3_STM32F100RB
+#if CPU_CM3_STM32F101C4 || CPU_CM3_STM32F103RB || CPU_CM3_STM32F103RE || CPU_CM3_STM32F100RB || CPU_CM3_STM32F102C4
#define FLASH_PAGE_SIZE 1024
#else
#error No embedded definition for select cpu
#else
#define CPU_CM3_STM32F101C4 0
#endif
+
+ #if defined (__ARM_STM32F102C4__)
+ #define CPU_CM3_STM32 1
+ #define CPU_CM3_STM32F102C4 1
+ #define CPU_NAME "STM32F102C4"
+ #else
+ #define CPU_CM3_STM32F102C4 0
+ #endif
#if defined (__ARM_STM32F103RB__)
#define CPU_CM3_STM32 1
#define CPU_CM3_STM32 0
#define CPU_CM3_SAM3 0
#elif defined (CPU_CM3_STM32)
- #if CPU_CM3_STM32F100RB + CPU_CM3_STM32F101C4 + CPU_CM3_STM32F103RB + CPU_CM3_STM32F103RE + 0 != 1
+ #if CPU_CM3_STM32F100RB + CPU_CM3_STM32F101C4 + CPU_CM3_STM32F103RB + CPU_CM3_STM32F103RE + CPU_CM3_STM32F102C4 + 0 != 1
#error STM32 Cortex-M3 CPU configuration error
#endif
#define CPU_CM3_LM3S 0