refractor board and start to add support for SWO retarget
This commit is contained in:
@@ -39,27 +39,18 @@
|
||||
|
||||
#if BOARD == BOARD_LPCXPRESSO1347
|
||||
|
||||
#include "LPC13Uxx.h"
|
||||
#include "lpc13uxx/gpio.h"
|
||||
#include "lpc13uxx/uart.h"
|
||||
|
||||
#define CFG_LED_PORT (0)
|
||||
#define CFG_LED_PIN (7)
|
||||
#define CFG_LED_ON (1)
|
||||
#define CFG_LED_OFF (0)
|
||||
|
||||
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();
|
||||
|
||||
// Leds Init
|
||||
GPIOSetDir(CFG_LED_PORT, CFG_LED_PIN, 1);
|
||||
LPC_GPIO->CLR[CFG_LED_PORT] = (1 << CFG_LED_PIN);
|
||||
|
||||
#if BSP_UART_ENABLE
|
||||
UARTInit(BSP_UART_BAUDRATE);
|
||||
#if CFG_UART_ENABLE
|
||||
UARTInit(CFG_UART_BAUDRATE);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -77,7 +68,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