board clean up, add button for ea4088

This commit is contained in:
hathach
2019-05-15 17:14:15 +07:00
parent b73047e350
commit 6e6f470b58
10 changed files with 103 additions and 130 deletions
+11 -14
View File
@@ -177,19 +177,6 @@ void board_init(void)
// Board porting API
//--------------------------------------------------------------------+
#if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0;
void SysTick_Handler (void)
{
system_ticks++;
}
uint32_t board_millis(void)
{
return system_ticks;
}
#endif
void board_led_write(bool state)
{
Chip_GPIO_SetPinState(LPC_GPIO_PORT, LED_PORT, LED_PIN, state);
@@ -201,7 +188,6 @@ uint32_t board_button_read(void)
return Chip_GPIO_GetPinState(LPC_GPIO_PORT, BUTTON_PORT, BUTTON_PIN) ? 0 : 1;
}
int board_uart_read(uint8_t* buf, int len)
{
//return UART_ReceiveByte(BOARD_UART_PORT);
@@ -218,4 +204,15 @@ int board_uart_write(void const * buf, int len)
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0;
void SysTick_Handler (void)
{
system_ticks++;
}
uint32_t board_millis(void)
{
return system_ticks;
}
#endif