fix missing board uart read/write()

This commit is contained in:
hathach 2019-10-24 12:20:06 +07:00
parent 33e3bf001c
commit 6f952a8e84
34 changed files with 239 additions and 69 deletions

View File

@ -125,15 +125,13 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -116,6 +116,18 @@ uint32_t board_button_read(void)
return gpio_get_pin_level(BUTTON_PIN); return gpio_get_pin_level(BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -131,16 +131,14 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
//return UART_ReceiveByte(BOARD_UART_PORT); //return UART_ReceiveByte(BOARD_UART_PORT);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
//UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING); //UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -254,16 +254,14 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
//return UART_ReceiveByte(BOARD_UART_PORT); //return UART_ReceiveByte(BOARD_UART_PORT);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
//UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING); //UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -116,6 +116,18 @@ uint32_t board_button_read(void)
return gpio_get_pin_level(BUTTON_PIN) ? 0 : 1; return gpio_get_pin_level(BUTTON_PIN) ? 0 : 1;
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -105,6 +105,18 @@ uint32_t board_button_read(void)
return gpio_get_pin_level(BUTTON_PIN) ? 0 : 1; return gpio_get_pin_level(BUTTON_PIN) ? 0 : 1;
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;

View File

@ -125,15 +125,13 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -172,6 +172,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -173,15 +173,13 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -100,15 +100,13 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -130,14 +130,12 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -113,14 +113,12 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -160,16 +160,14 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
// return UART_ReceiveByte(BOARD_UART_PORT); // return UART_ReceiveByte(BOARD_UART_PORT);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
// UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING); // UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -144,15 +144,13 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -145,15 +145,13 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -187,15 +187,13 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -152,16 +152,14 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
// return UART_ReceiveByte(BOARD_UART_PORT); // return UART_ReceiveByte(BOARD_UART_PORT);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
// UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING); // UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -28,14 +28,13 @@
#include "../board.h" #include "../board.h"
// PD_10 // PD_10
#define LED_PORT 6 #define LED_PORT 6
#define LED_PIN 24 #define LED_PIN 24
// P4_0 // P4_0
#define BUTTON_PORT 2 #define BUTTON_PORT 2
#define BUTTON_PIN 0 #define BUTTON_PIN 0
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
// MACRO TYPEDEF CONSTANT ENUM DECLARATION // MACRO TYPEDEF CONSTANT ENUM DECLARATION
//--------------------------------------------------------------------+ //--------------------------------------------------------------------+
@ -191,16 +190,14 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
//return UART_ReceiveByte(BOARD_UART_PORT); //return UART_ReceiveByte(BOARD_UART_PORT);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
//UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING); //UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -116,6 +116,18 @@ uint32_t board_button_read(void)
return gpio_get_pin_level(BUTTON_PIN) ? 0 : 1; return gpio_get_pin_level(BUTTON_PIN) ? 0 : 1;
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -105,6 +105,18 @@ uint32_t board_button_read(void)
return gpio_get_pin_level(BUTTON_PIN) ? 0 : 1; return gpio_get_pin_level(BUTTON_PIN) ? 0 : 1;
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;

View File

@ -236,16 +236,14 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
//return UART_ReceiveByte(BOARD_UART_PORT); //return UART_ReceiveByte(BOARD_UART_PORT);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
//UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING); //UART_Send(BOARD_UART_PORT, &c, 1, BLOCKING);
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -154,8 +154,7 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
// return NRFX_SUCCESS == nrfx_uart_rx(&_uart_id, buf, (size_t) len) ? len : 0; // return NRFX_SUCCESS == nrfx_uart_rx(&_uart_id, buf, (size_t) len) ? len : 0;
} }

View File

@ -123,15 +123,13 @@ uint32_t board_button_read(void)
int board_uart_read(uint8_t* buf, int len) int board_uart_read(uint8_t* buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }
int board_uart_write(void const * buf, int len) int board_uart_write(void const * buf, int len)
{ {
(void) buf; (void) buf; (void) len;
(void) len;
return 0; return 0;
} }

View File

@ -174,6 +174,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -109,6 +109,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -131,6 +131,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -139,6 +139,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -152,6 +152,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -143,6 +143,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -169,6 +169,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -168,6 +168,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -195,6 +195,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -161,6 +161,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)

View File

@ -182,6 +182,18 @@ uint32_t board_button_read(void)
return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN); return BUTTON_STATE_ACTIVE == HAL_GPIO_ReadPin(BUTTON_PORT, BUTTON_PIN);
} }
int board_uart_read(uint8_t* buf, int len)
{
(void) buf; (void) len;
return 0;
}
int board_uart_write(void const * buf, int len)
{
(void) buf; (void) len;
return 0;
}
#if CFG_TUSB_OS == OPT_OS_NONE #if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0; volatile uint32_t system_ticks = 0;
void SysTick_Handler (void) void SysTick_Handler (void)