aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGareth McMullin2011-12-18 16:43:02 +1300
committerGareth McMullin2011-12-18 16:43:02 +1300
commit8061205260f738dc5a2be2706afe35fd12e59dd5 (patch)
treeed63576a6a0873ee7fa06bd7785ef3d658609ee1 /src
parentc7c31d25027e493b20b9ecde2f4f55d317638b2f (diff)
Removed #if LIGHT for unfinished hardware.
Diffstat (limited to 'src')
-rw-r--r--src/stm32/platform.c11
-rw-r--r--src/stm32/platform.h49
2 files changed, 18 insertions, 42 deletions
diff --git a/src/stm32/platform.c b/src/stm32/platform.c
index 84528aa..4dd6137 100644
--- a/src/stm32/platform.c
+++ b/src/stm32/platform.c
@@ -49,11 +49,7 @@ static void uart_init(void);
int platform_init(void)
{
-#ifndef LIGHT
rcc_clock_setup_in_hse_8mhz_out_72mhz();
-#else
- rcc_clock_setup_in_hsi_out_48mhz();
-#endif
/* Enable peripherals */
rcc_peripheral_enable_clock(&RCC_APB1ENR, RCC_APB1ENR_USBEN);
@@ -63,10 +59,6 @@ int platform_init(void)
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPDEN);
/* Setup GPIO ports */
-#ifdef LIGHT
- rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_AFIOEN);
- AFIO_MAPR |= AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON;
-#endif
gpio_clear(USB_PU_PORT, USB_PU_PIN);
gpio_set_mode(USB_PU_PORT, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT,
USB_PU_PIN);
@@ -93,9 +85,8 @@ int platform_init(void)
#ifdef INCLUDE_UART_INTERFACE
uart_init();
#endif
-#ifndef LIGHT
SCB_VTOR = 0x2000; // Relocate interrupt vector table here
-#endif
+
cdcacm_init();
jtag_scan();
diff --git a/src/stm32/platform.h b/src/stm32/platform.h
index d23d42b..69dc3b4 100644
--- a/src/stm32/platform.h
+++ b/src/stm32/platform.h
@@ -53,38 +53,23 @@
*/
/* Hardware definitions... */
-#ifndef LIGHT
-# define JTAG_PORT GPIOA
-# define TDI_PIN GPIO3
-# define TMS_PIN GPIO4
-# define TCK_PIN GPIO5
-# define TDO_PIN GPIO6
-
-# define SWDP_PORT JTAG_PORT
-# define SWDIO_PIN TMS_PIN
-# define SWCLK_PIN TCK_PIN
-
-# define USB_PU_PORT GPIOA
-# define USB_PU_PIN GPIO8
-
-# define LED_PORT GPIOB
-# define LED_RUN GPIO2
-# define LED_IDLE GPIO10
-# define LED_ERROR GPIO11
-#else
-# define JTAG_PORT GPIOA
-# define TDI_PIN GPIO3
-# define TMS_PIN GPIO2
-# define TCK_PIN GPIO7
-# define TDO_PIN GPIO6
-
-# define SWDP_PORT JTAG_PORT
-# define SWDIO_PIN TMS_PIN
-# define SWCLK_PIN TCK_PIN
-
-# define USB_PU_PORT GPIOA
-# define USB_PU_PIN GPIO15
-#endif
+#define JTAG_PORT GPIOA
+#define TDI_PIN GPIO3
+#define TMS_PIN GPIO4
+#define TCK_PIN GPIO5
+#define TDO_PIN GPIO6
+
+#define SWDP_PORT JTAG_PORT
+#define SWDIO_PIN TMS_PIN
+#define SWCLK_PIN TCK_PIN
+
+#define USB_PU_PORT GPIOA
+#define USB_PU_PIN GPIO8
+
+#define LED_PORT GPIOB
+#define LED_RUN GPIO2
+#define LED_IDLE GPIO10
+#define LED_ERROR GPIO11
#define DEBUG(...)