Your ROOT_URL in app.ini is https://git.ondrovo.com/ but you are visiting http://159.69.29.240:49153/electro/toaster-oven-bluepill/src/branch/master/Core/Src/uart_stdout.c You should set ROOT_URL correctly, otherwise the web may not work correctly.
 
 
 
toaster-oven-bluepill/Core/Src/uart_stdout.c

52 lines
1.1 KiB

/**
* TODO file description
*/
#include <string.h>
#include "uart_stdout.h"
#include "FreeRTOS.h"
#include "main.h"
#define USE_CRITICAL 0
void stdout_putchar(char c) {
#if USE_CRITICAL
portENTER_CRITICAL();
#endif
while (!LL_USART_IsActiveFlag_TXE(USART_DEBUG)) {}
LL_USART_TransmitData8(USART_DEBUG, c);
while (!LL_USART_IsActiveFlag_TC(USART_DEBUG)) {}
#if USE_CRITICAL
portEXIT_CRITICAL();
#endif
}
void stdout_write(const char *pcBuffer, const size_t iLength) {
#if USE_CRITICAL
portENTER_CRITICAL();
#endif
while (!LL_USART_IsActiveFlag_TXE(USART_DEBUG)) {}
int cnt = (int) iLength;
while (cnt-- > 0) {
char c = *pcBuffer++;
LL_USART_TransmitData8(USART_DEBUG, c);
while (!LL_USART_IsActiveFlag_TC(USART_DEBUG)) {}
}
#if USE_CRITICAL
portEXIT_CRITICAL();
#endif
}
void stdout_puts(const char *pcBuffer) {
stdout_write(pcBuffer, strlen(pcBuffer));
}
/**
* @brief Retargets the C library printf function to the USART.
* @param None
* @retval None
*/
int _write(int fd, const char *pcBuffer, const int iLength) {
stdout_write(pcBuffer, iLength);
return iLength;
}