need a better way to recv UART
This commit is contained in:
+6
-5
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user