From 8014d434dedca4f8066dfd5b3d25bf98e72a66b7 Mon Sep 17 00:00:00 2001 From: Frantisek Burian Date: Sat, 4 Jan 2014 17:27:57 +0100 Subject: [PATCH] Update to the newest libopencm3 --- libopencm3 | 2 +- src/platforms/f4discovery/platform.c | 2 +- src/platforms/f4discovery/usbdfu.c | 2 +- src/platforms/native/platform.c | 2 +- src/platforms/native/usbdfu.c | 2 +- src/platforms/stlink/platform.c | 6 +++--- src/platforms/stlink/usbdfu.c | 2 +- src/platforms/swlink/platform.c | 2 +- src/platforms/swlink/usbdfu.c | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libopencm3 b/libopencm3 index f4cd74a7..a909b5ca 160000 --- a/libopencm3 +++ b/libopencm3 @@ -1 +1 @@ -Subproject commit f4cd74a741084decb805d8dd15253f77f404ad24 +Subproject commit a909b5ca9e18f802e3caef19e63d38861662c128 diff --git a/src/platforms/f4discovery/platform.c b/src/platforms/f4discovery/platform.c index 6ee36bd3..2786954d 100644 --- a/src/platforms/f4discovery/platform.c +++ b/src/platforms/f4discovery/platform.c @@ -81,7 +81,7 @@ int platform_init(void) LED_UART | LED_IDLE_RUN | LED_ERROR | LED_BOOTLOADER); /* Setup heartbeat timer */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(168000000/(10*8)); /* Interrupt us at 10 Hz */ SCB_SHPR(11) &= ~((15 << 4) & 0xff); SCB_SHPR(11) |= ((14 << 4) & 0xff); diff --git a/src/platforms/f4discovery/usbdfu.c b/src/platforms/f4discovery/usbdfu.c index 998628be..b7af1152 100644 --- a/src/platforms/f4discovery/usbdfu.c +++ b/src/platforms/f4discovery/usbdfu.c @@ -42,7 +42,7 @@ int main(void) /* Set up clock*/ rcc_clock_setup_hse_3v3(&hse_8mhz_3v3[CLOCK_3V3_168MHZ]); - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(2100000); systick_interrupt_enable(); diff --git a/src/platforms/native/platform.c b/src/platforms/native/platform.c index 214625eb..c0ce6583 100644 --- a/src/platforms/native/platform.c +++ b/src/platforms/native/platform.c @@ -119,7 +119,7 @@ int platform_init(void) } /* Setup heartbeat timer */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Interrupt us at 10 Hz */ SCB_SHPR(11) &= ~((15 << 4) & 0xff); SCB_SHPR(11) |= ((14 << 4) & 0xff); diff --git a/src/platforms/native/usbdfu.c b/src/platforms/native/usbdfu.c index 35572a5c..068138e7 100644 --- a/src/platforms/native/usbdfu.c +++ b/src/platforms/native/usbdfu.c @@ -41,7 +41,7 @@ int main(void) dfu_protect_enable(); rcc_clock_setup_in_hse_8mhz_out_72mhz(); - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPAEN); diff --git a/src/platforms/stlink/platform.c b/src/platforms/stlink/platform.c index 03509ead..d7ae41d7 100644 --- a/src/platforms/stlink/platform.c +++ b/src/platforms/stlink/platform.c @@ -22,13 +22,13 @@ * implementation. */ -#include +#include #include #include #include #include #include -#include +#include #include "platform.h" #include "jtag_scan.h" @@ -108,7 +108,7 @@ int platform_init(void) GPIO_CNF_OUTPUT_PUSHPULL, led_idle_run); /* Setup heartbeat timer */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Interrupt us at 10 Hz */ SCB_SHPR(11) &= ~((15 << 4) & 0xff); SCB_SHPR(11) |= ((14 << 4) & 0xff); diff --git a/src/platforms/stlink/usbdfu.c b/src/platforms/stlink/usbdfu.c index 76a19b05..c14fd5a8 100644 --- a/src/platforms/stlink/usbdfu.c +++ b/src/platforms/stlink/usbdfu.c @@ -95,7 +95,7 @@ int main(void) dfu_protect_enable(); rcc_clock_setup_in_hse_8mhz_out_72mhz(); - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Handle USB disconnect/connect */ diff --git a/src/platforms/swlink/platform.c b/src/platforms/swlink/platform.c index 1b45cfba..ea88dcb9 100644 --- a/src/platforms/swlink/platform.c +++ b/src/platforms/swlink/platform.c @@ -86,7 +86,7 @@ int platform_init(void) AFIO_MAPR = data; /* Setup heartbeat timer */ - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Interrupt us at 10 Hz */ SCB_SHPR(11) &= ~((15 << 4) & 0xff); SCB_SHPR(11) |= ((14 << 4) & 0xff); diff --git a/src/platforms/swlink/usbdfu.c b/src/platforms/swlink/usbdfu.c index 29c38091..69cc1e2b 100644 --- a/src/platforms/swlink/usbdfu.c +++ b/src/platforms/swlink/usbdfu.c @@ -61,7 +61,7 @@ int main(void) dfu_protect_enable(); rcc_clock_setup_in_hse_8mhz_out_72mhz(); - systick_set_clocksource(STK_CTRL_CLKSOURCE_AHB_DIV8); + systick_set_clocksource(STK_CSR_CLKSOURCE_AHB_DIV8); systick_set_reload(900000); /* Handle USB disconnect/connect */