|
@@ -19,7 +19,12 @@
|
|
#include "FreeRTOS.h"
|
|
#include "FreeRTOS.h"
|
|
#include "semphr.h"
|
|
#include "semphr.h"
|
|
|
|
|
|
|
|
+#ifdef PRINTF_STDLIB
|
|
|
|
+#include <stdio.h>
|
|
|
|
+#endif
|
|
|
|
+#ifdef PRINTF_CUSTOM
|
|
#include "tinystdio.h"
|
|
#include "tinystdio.h"
|
|
|
|
+#endif
|
|
|
|
|
|
#ifdef BT6702_SERVICE
|
|
#ifdef BT6702_SERVICE
|
|
#define UPS_RBUF_SIZE 1024
|
|
#define UPS_RBUF_SIZE 1024
|
|
@@ -97,7 +102,9 @@ void InitUSART(void) {
|
|
rbuf32_init(&user_tx_rbuf, user_tx_fifo, USER_RBUF_SIZE);
|
|
rbuf32_init(&user_tx_rbuf, user_tx_fifo, USER_RBUF_SIZE);
|
|
rbuf32_init(&user_rx_rbuf, user_rx_fifo, USER_RBUF_SIZE);
|
|
rbuf32_init(&user_rx_rbuf, user_rx_fifo, USER_RBUF_SIZE);
|
|
uart_hw_init(USER_USART, USER_USART_BAUD, USER_USART_WORD_LEN, USER_USART_PARITY, USER_USART_STOP_BIT);
|
|
uart_hw_init(USER_USART, USER_USART_BAUD, USER_USART_WORD_LEN, USER_USART_PARITY, USER_USART_STOP_BIT);
|
|
|
|
+#ifdef PRINTF_CUSTOM
|
|
init_printf(NULL, putc_);
|
|
init_printf(NULL, putc_);
|
|
|
|
+#endif
|
|
}
|
|
}
|
|
|
|
|
|
void ups_putchar(uint16_t byte) {
|
|
void ups_putchar(uint16_t byte) {
|