1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #12768 from aabadie/pr/boards/pic32-clicker-uart-cleanup

boards/pic32-clicker: cleanup uart configuration and initialization, cleanup header includes
This commit is contained in:
Francisco 2019-11-22 17:20:40 +01:00 committed by GitHub
commit 3c60afc083
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 13 deletions

View File

@ -7,13 +7,9 @@
* directory for more details.
*
*/
#include <stdio.h>
#include <stdint.h>
#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);
@ -26,11 +22,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);

View File

@ -26,6 +26,7 @@
#ifndef BOARD_H
#define BOARD_H
#include "cpu.h"
#include "periph_conf.h"
#ifdef __cplusplus
@ -40,6 +41,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)
*/

View File

@ -53,8 +53,6 @@ extern "C" {
* @{
*/
#define UART_NUMOF (4)
#define DEBUG_VIA_UART (3)
#define DEBUG_UART_BAUD (9600)
/** @} */
#ifdef __cplusplus