Test USART reading

This commit is contained in:
2024-08-27 00:38:12 +02:00
parent 42792bfdf8
commit 0f5a383f14
7 changed files with 94 additions and 81 deletions

View File

@@ -1,5 +1,5 @@
#include "common.h"
#include "uart.h"
#include "serial.h"
#include <stdio.h>
@@ -17,17 +17,17 @@ int main(void)
return 1;
}
UART_Init();
USART_Init();
for (i = 1;; i++) {
if (i >= 99999) i = 1;
sprintf(buf, "[CORE] Fetching sensors #%05lu...\r\n", i);
UART_Write(buf);
USART_Write(buf);
UART_Read(&cmd, MAX_CMDBUF);
sprintf(buf, "[CORE] Checking cmdbuf=\"%s\"\r\n", cmd);
UART_Write(buf);
// USART_Read(&cmd, MAX_CMDBUF);
// sprintf(buf, "[CORE] Checking cmdbuf=\"%s\"\r\n", cmd);
// USART_Write(buf);
Sleep(3000);
}