1
mirror of https://github.com/egzumer/uv-k5-firmware-custom.git synced 2025-12-12 04:34:31 +04:00
Files
uv-k5-firmware-custom/debugging.h

26 lines
420 B
C
Raw Normal View History

2023-10-28 11:12:37 +02:00
#ifndef DEBUGGING_H
#define DEBUGGING_H
#include "driver/uart.h"
2023-11-30 23:54:26 +01:00
#include "driver/bk4819.h"
2023-10-28 11:12:37 +02:00
#include "string.h"
#include "external/printf/printf.h"
static inline void LogUart(char * str)
{
UART_Send(str, strlen(str));
}
2023-11-30 23:54:26 +01:00
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);
}
2023-10-28 11:12:37 +02:00
#endif