mirror of
https://github.com/silenty4ng/uv-k5-firmware-chinese-lts
synced 2025-01-15 14:54:40 +00:00
写频
This commit is contained in:
parent
b3aa07bd45
commit
e6d69b5f0b
1 changed files with 6 additions and 6 deletions
12
app/uart.c
12
app/uart.c
|
@ -429,8 +429,8 @@ bool UART_IsCommandAvailable(void)
|
|||
uint16_t CRC;
|
||||
uint16_t CommandLength;
|
||||
uint16_t DmaLength = DMA_CH0->ST & 0xFFFU;
|
||||
char a[2]="OK";
|
||||
UART_Send((uint8_t *)&a,2);
|
||||
char d[2]="OK";
|
||||
UART_Send((uint8_t *)&d,2);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@ -443,8 +443,8 @@ bool UART_IsCommandAvailable(void)
|
|||
|
||||
if (gUART_WriteIndex == DmaLength)
|
||||
return false;
|
||||
char a[2]="2K";
|
||||
UART_Send((uint8_t *)&a,2);
|
||||
char c[2]="2K";
|
||||
UART_Send((uint8_t *)&c,2);
|
||||
if (gUART_WriteIndex < DmaLength)
|
||||
CommandLength = DmaLength - gUART_WriteIndex;
|
||||
else
|
||||
|
@ -514,8 +514,8 @@ bool UART_IsCommandAvailable(void)
|
|||
}
|
||||
|
||||
CRC = UART_Command.Buffer[Size] | (UART_Command.Buffer[Size + 1] << 8);
|
||||
char a[2]="3K";
|
||||
UART_Send((uint8_t *)&a,2);
|
||||
char b[2]="3K";
|
||||
UART_Send((uint8_t *)&b,2);
|
||||
return (CRC_Calculate(UART_Command.Buffer, Size) != CRC) ? false : true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue