refractor board and start to add support for SWO retarget
This commit is contained in:
@@ -39,26 +39,17 @@
|
||||
|
||||
#if BOARD == BOARD_AT86RF2XX
|
||||
|
||||
#include "LPC11Uxx.h"
|
||||
#include "lpc11uxx/gpio.h"
|
||||
#include "lpc11uxx/uart.h"
|
||||
|
||||
#define CFG_LED_PORT (1)
|
||||
#define CFG_LED_PIN (31)
|
||||
#define CFG_LED_ON (0)
|
||||
#define CFG_LED_OFF (1)
|
||||
|
||||
void board_init(void)
|
||||
{
|
||||
SystemInit();
|
||||
SysTick_Config(SystemCoreClock / BSP_TICKS_PER_SECOND); // 1 msec tick timer
|
||||
SysTick_Config(SystemCoreClock / CFG_TICKS_PER_SECOND); // 1 msec tick timer
|
||||
GPIOInit();
|
||||
|
||||
GPIOSetDir(CFG_LED_PORT, CFG_LED_PIN, 1);
|
||||
board_leds(0x01, 0); // turn off the led first
|
||||
|
||||
#if BSP_UART_ENABLE
|
||||
UARTInit(BSP_UART_BAUDRATE);
|
||||
#if CFG_UART_ENABLE
|
||||
UARTInit(CFG_UART_BAUDRATE);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -74,7 +65,7 @@ void board_leds(uint32_t mask, uint32_t state)
|
||||
//--------------------------------------------------------------------+
|
||||
// UART
|
||||
//--------------------------------------------------------------------+
|
||||
#if BSP_UART_ENABLE
|
||||
#if CFG_UART_ENABLE
|
||||
uint32_t board_uart_send(uint8_t *buffer, uint32_t length)
|
||||
{
|
||||
UARTSend(buffer, length);
|
||||
|
||||
Reference in New Issue
Block a user