/* missing type */
typedef unsigned int uint32_t;
-
+void main(void);
/* hardware configuration */
(1 << (13 * 2)) | (1 << (14 * 2)) | (1 << (15 * 2));
}
+#elif CONFIG_STM32F0_DISCOVERY
+
+#define GPIOC 0x48000800 /* port C */
+#define GPIOC_MODER (GPIOC + 0x00) /* port mode register */
+#define LED_PORT_ODR (GPIOC + 0x14) /* port output data register */
+
+#define LED_BLUE (1 << 8) /* port C, pin 8 */
+#define LED_GREEN (1 << 9) /* port C, pin 9 */
+#define LED_ORANGE 0
+#define LED_RED 0
+
+void _tmain(void) {
+ main();
+}
+static inline void setup_leds(void)
+{
+ /* configure port 8 and 9 as output */
+ *(volatile uint32_t*)GPIOC_MODER |= (1 << (9* 2)) | (1 << (8 * 2));
+}
+
#else
#error "Architecture must be defined!"
#endif /* otherwise, error */