mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
uart update
This commit is contained in:
parent
7bd83cdd32
commit
25fee556c6
@ -113,18 +113,16 @@ 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;
|
|
||||||
|
|
||||||
va_list va;
|
va_list va;
|
||||||
va_start(va, str);
|
va_start(va, str);
|
||||||
len = vsnprintf(text, sizeof(text), str, va);
|
len = vsnprintf(text, sizeof(text), str, va);
|
||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
UART_Send(text, len);
|
UART_Send(text, len);
|
||||||
//UART_Send(text, strlen(text));
|
//UART_Send(text, strlen(text));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
2
main.c
2
main.c
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user