Refactor cleanup

This commit is contained in:
Krzysiek Egzmont
2023-11-30 23:54:26 +01:00
parent 292e2e7e7e
commit c341570838
10 changed files with 358 additions and 472 deletions

View File

@@ -2,6 +2,7 @@
#define DEBUGGING_H
#include "driver/uart.h"
#include "driver/bk4819.h"
#include "string.h"
#include "external/printf/printf.h"
@@ -11,6 +12,13 @@ static inline void LogUart(char * str)
UART_Send(str, strlen(str));
}
static inline void LogRegUart(uint16_t reg)
{
uint16_t regVal = BK4819_ReadRegister(reg);
char buf[32];
sprintf(buf, "reg%02X: %04X\n", reg, regVal);
LogUart(buf);
}