mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-03-22 01:31:21 +03:00
little fix
This commit is contained in:
@@ -95,7 +95,7 @@ int main(){
|
||||
poll_ultrasonic();
|
||||
poll_ADC();
|
||||
if(usbdatalen){ // there's something in USB buffer
|
||||
usbdatalen = parce_incoming_buf(usbdatabuf, usbdatalen);
|
||||
usbdatalen = parse_incoming_buf(usbdatabuf, usbdatalen);
|
||||
}
|
||||
if((string = check_UART2())){
|
||||
// P(string);
|
||||
|
||||
@@ -98,7 +98,7 @@ void UART_isr(uint32_t UART){
|
||||
UART_buff *curbuff;
|
||||
// Check if we were called because of RXNE
|
||||
if(USART_SR(UART) & USART_SR_RXNE){
|
||||
// parce incoming byte
|
||||
// parse incoming byte
|
||||
data = usart_recv(UART);
|
||||
fill_uart_RXbuff(UART, data);
|
||||
}
|
||||
|
||||
@@ -62,10 +62,10 @@ uint8_t show_int(int32_t v){
|
||||
}
|
||||
|
||||
/**
|
||||
* parce command buffer buf with length len
|
||||
* parse command buffer buf with length len
|
||||
* return 0 if buffer processed or len if there's not enough data in buffer
|
||||
*/
|
||||
int parce_incoming_buf(char *buf, int len){
|
||||
int parse_incoming_buf(char *buf, int len){
|
||||
uint8_t command;
|
||||
//uint32_t utmp;
|
||||
int i = 0, j;
|
||||
|
||||
@@ -42,6 +42,6 @@ void prnt(uint8_t *wrd);
|
||||
void print_int(int32_t N);
|
||||
void print_hex(uint8_t *buff, uint8_t l);
|
||||
|
||||
int parce_incoming_buf(char *buf, int len);
|
||||
int parse_incoming_buf(char *buf, int len);
|
||||
|
||||
#endif // __USER_PROTO_H__
|
||||
|
||||
Reference in New Issue
Block a user