need a better way to recv UART

This commit is contained in:
yichin
2020-05-14 18:31:23 +08:00
parent 2b3b7e342c
commit 12d74ef802
@@ -957,11 +957,12 @@ static void SimpleBLECentral_handleKeys(uint8_t shift, uint8_t keys)
switch (state)
{
case BLE_STATE_IDLE:
// if(keys & KEY_UART_EN)
// {
// int rxBytes = UART_read(handle, UART_rxBuf, 10);
// UART_write(handle, UART_rxBuf, 10);
// }
if(keys & KEY_UART_EN)
{
SetMemOutputPIN(Board_GLED, 1);
int rxBytes = UART_read(handle, UART_rxBuf, 10);
UART_write(handle, UART_rxBuf, 10);
}
if (keys & KEY_RIGHT)
{