Modified for BG96
Fork of mbed-dev by
Diff: platform/mbed_board.c
- Revision:
- 187:0387e8f68319
- Parent:
- 174:b96e65c34a4d
diff -r 707f6e361f3e -r 0387e8f68319 platform/mbed_board.c --- a/platform/mbed_board.c Fri Jun 22 16:45:37 2018 +0100 +++ b/platform/mbed_board.c Thu Sep 06 13:40:20 2018 +0100 @@ -26,11 +26,13 @@ extern serial_t stdio_uart; #endif -WEAK void mbed_die(void) { +WEAK void mbed_die(void) +{ #if !defined (NRF51_H) && !defined(TARGET_EFM32) core_util_critical_section_enter(); #endif - gpio_t led_err; gpio_init_out(&led_err, LED1); + gpio_t led_err; + gpio_init_out(&led_err, LED1); while (1) { for (int i = 0; i < 4; ++i) { @@ -49,14 +51,16 @@ } } -void mbed_error_printf(const char* format, ...) { +void mbed_error_printf(const char *format, ...) +{ va_list arg; va_start(arg, format); mbed_error_vfprintf(format, arg); va_end(arg); } -void mbed_error_vfprintf(const char * format, va_list arg) { +void mbed_error_vfprintf(const char *format, va_list arg) +{ #if DEVICE_SERIAL #define ERROR_BUF_SIZE (128) core_util_critical_section_enter(); @@ -70,7 +74,7 @@ char stdio_out_prev = '\0'; for (int i = 0; i < size; i++) { if (buffer[i] == '\n' && stdio_out_prev != '\r') { - serial_putc(&stdio_uart, '\r'); + serial_putc(&stdio_uart, '\r'); } serial_putc(&stdio_uart, buffer[i]); stdio_out_prev = buffer[i];