0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 22:31:25 +03:00

uart update

This commit is contained in:
OneOfEleven 2023-10-27 17:48:09 +01:00
parent 7bd83cdd32
commit 25fee556c6
5 changed files with 14 additions and 18 deletions

View File

@ -113,9 +113,8 @@ void UART_LogSendText(const void *str)
UART_Send(str, strlen(str)); UART_Send(str, strlen(str));
} }
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG) void UART_printf(const char *str, ...)
void UART_printf(const char *str, ...) {
{
char text[256]; char text[256];
int len; int len;
@ -126,5 +125,4 @@ void UART_LogSendText(const void *str)
UART_Send(text, len); UART_Send(text, len);
//UART_Send(text, strlen(text)); //UART_Send(text, strlen(text));
} }
#endif

View File

@ -27,9 +27,7 @@ void UART_Send(const void *pBuffer, uint32_t Size);
void UART_SendText(const void *str); void UART_SendText(const void *str);
void UART_LogSend(const void *pBuffer, uint32_t Size); void UART_LogSend(const void *pBuffer, uint32_t Size);
void UART_LogSendText(const void *str); void UART_LogSendText(const void *str);
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG) void UART_printf(const char *str, ...);
void UART_printf(const char *str, ...);
#endif
#endif #endif

Binary file not shown.

Binary file not shown.

2
main.c
View File

@ -90,7 +90,7 @@ void Main(void)
BK4819_Init(); BK4819_Init();
#if defined(ENABLE_UART) && defined(ENABLE_UART_DEBUG) #if defined(ENABLE_UART)
UART_printf("bk4819 id %04X rev %04X\r\n", BK4819_ReadRegister(0x00), BK4819_ReadRegister(0x01)); UART_printf("bk4819 id %04X rev %04X\r\n", BK4819_ReadRegister(0x00), BK4819_ReadRegister(0x01));
#endif #endif