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:
commit
3c60afc083
@ -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);
|
||||
|
@ -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)
|
||||
*/
|
||||
|
@ -53,8 +53,6 @@ extern "C" {
|
||||
* @{
|
||||
*/
|
||||
#define UART_NUMOF (4)
|
||||
#define DEBUG_VIA_UART (3)
|
||||
#define DEBUG_UART_BAUD (9600)
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user