From e8b0399bc9d7c38392f30aca0f5fefd3af249c21 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Thu, 21 Nov 2019 11:18:32 +0100 Subject: [PATCH 1/2] boards/pic32-clicker: cleanup uart initialization --- boards/pic32-clicker/clicker.c | 5 ----- boards/pic32-clicker/include/board.h | 7 +++++++ boards/pic32-clicker/include/periph_conf.h | 2 -- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/boards/pic32-clicker/clicker.c b/boards/pic32-clicker/clicker.c index 1146ff79b2..6e665be72b 100644 --- a/boards/pic32-clicker/clicker.c +++ b/boards/pic32-clicker/clicker.c @@ -26,11 +26,6 @@ void board_init(void) U3RXR = 0x2; /*connect pin RPF5 to UART3 RX*/ RPF4R = 0x1; /*connect pin RPF4 to UART3 TX*/ - /* intialise UART used for debug (printf) */ -#ifdef DEBUG_VIA_UART - uart_init(DEBUG_VIA_UART, DEBUG_UART_BAUD, NULL, 0); -#endif - /* Turn off all LED's */ gpio_init(LED1_PIN, GPIO_OUT); gpio_init(LED2_PIN, GPIO_OUT); diff --git a/boards/pic32-clicker/include/board.h b/boards/pic32-clicker/include/board.h index 6491c9efc1..33d94d0a1b 100644 --- a/boards/pic32-clicker/include/board.h +++ b/boards/pic32-clicker/include/board.h @@ -40,6 +40,13 @@ extern "C" { */ #define TICKS_PER_US (48) +/** + * @brief Use the 3rd UART for STDIO on this board + * + * This is the UART connected to the MikroBus. + */ +#define STDIO_UART_DEV UART_DEV(3) + /** * @brief We are using an External Interrupt Controller (all pic32 devices use this mode) */ diff --git a/boards/pic32-clicker/include/periph_conf.h b/boards/pic32-clicker/include/periph_conf.h index b664ac14f5..6e84dc7b14 100644 --- a/boards/pic32-clicker/include/periph_conf.h +++ b/boards/pic32-clicker/include/periph_conf.h @@ -53,8 +53,6 @@ extern "C" { * @{ */ #define UART_NUMOF (4) -#define DEBUG_VIA_UART (3) -#define DEBUG_UART_BAUD (9600) /** @} */ #ifdef __cplusplus From 401abd5b71efaa5ec20c98fc7e78b92082a9aacb Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Thu, 21 Nov 2019 11:18:48 +0100 Subject: [PATCH 2/2] boards/pic32-clicker: cleanup includes --- boards/pic32-clicker/clicker.c | 8 ++------ boards/pic32-clicker/include/board.h | 1 + 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/boards/pic32-clicker/clicker.c b/boards/pic32-clicker/clicker.c index 6e665be72b..fe8dfdd9f3 100644 --- a/boards/pic32-clicker/clicker.c +++ b/boards/pic32-clicker/clicker.c @@ -7,13 +7,9 @@ * directory for more details. * */ -#include -#include -#include "periph/gpio.h" -#include "periph/uart.h" -#include "bitarithm.h" + #include "board.h" -#include "cpu.h" +#include "periph/gpio.h" extern void dummy(void); diff --git a/boards/pic32-clicker/include/board.h b/boards/pic32-clicker/include/board.h index 33d94d0a1b..03cd42931e 100644 --- a/boards/pic32-clicker/include/board.h +++ b/boards/pic32-clicker/include/board.h @@ -26,6 +26,7 @@ #ifndef BOARD_H #define BOARD_H +#include "cpu.h" #include "periph_conf.h" #ifdef __cplusplus