Clean up whitespace
This commit is contained in:
@ -145,9 +145,9 @@ static void setup_clocks(void) {
|
||||
* at the Flash base address, 0x08000000.
|
||||
*/
|
||||
#if defined(BOOTLOADER_maple)
|
||||
#define USER_ADDR_ROM 0x08002000
|
||||
#define USER_ADDR_ROM 0x08002000
|
||||
#else
|
||||
#define USER_ADDR_ROM 0x08000000
|
||||
#define USER_ADDR_ROM 0x08000000
|
||||
#endif
|
||||
#define USER_ADDR_RAM 0x20000C00
|
||||
extern char __text_start__;
|
||||
|
@ -68,12 +68,12 @@ namespace wirish {
|
||||
rcc_set_prescaler(RCC_PRESCALER_AHB, RCC_AHB_SYSCLK_DIV_1);
|
||||
rcc_set_prescaler(RCC_PRESCALER_APB1, RCC_APB1_HCLK_DIV_2);
|
||||
rcc_set_prescaler(RCC_PRESCALER_APB2, RCC_APB2_HCLK_DIV_1);
|
||||
rcc_clk_disable(RCC_USB);
|
||||
#if F_CPU == 72000000
|
||||
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
|
||||
#elif F_CPU == 48000000
|
||||
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1);
|
||||
#endif
|
||||
rcc_clk_disable(RCC_USB);
|
||||
#if F_CPU == 72000000
|
||||
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1_5);
|
||||
#elif F_CPU == 48000000
|
||||
rcc_set_prescaler(RCC_PRESCALER_USB, RCC_USB_SYSCLK_DIV_1);
|
||||
#endif
|
||||
}
|
||||
|
||||
__weak void board_setup_gpio(void) {
|
||||
@ -84,15 +84,15 @@ namespace wirish {
|
||||
#ifdef SERIAL_USB
|
||||
|
||||
#ifdef GENERIC_BOOTLOADER
|
||||
//Reset the USB interface on generic boards - developed by Victor PV
|
||||
gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_OUTPUT_PP);
|
||||
gpio_write_bit(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit,0);
|
||||
//Reset the USB interface on generic boards - developed by Victor PV
|
||||
gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_OUTPUT_PP);
|
||||
gpio_write_bit(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit,0);
|
||||
|
||||
for(volatile unsigned int i=0;i<512;i++);// Only small delay seems to be needed, and USB pins will get configured in Serial.begin
|
||||
gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_INPUT_FLOATING);
|
||||
for(volatile unsigned int i=0;i<512;i++);// Only small delay seems to be needed, and USB pins will get configured in Serial.begin
|
||||
gpio_set_mode(PIN_MAP[PA12].gpio_device, PIN_MAP[PA12].gpio_bit, GPIO_INPUT_FLOATING);
|
||||
#endif
|
||||
|
||||
Serial.begin();// Roger Clark. Changed SerialUSB to Serial for Arduino sketch compatibility
|
||||
Serial.begin();// Roger Clark. Changed SerialUSB to Serial for Arduino sketch compatibility
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user