• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef DBG_PRINTF_H_
2 #define DBG_PRINTF_H_
3 
4 #include "gr55xx_hal.h"
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
10 /* Ring buffer for interrupt send */
11 #define DBG_RING_BUF_SIZE       (8192ul)
12 
13 /* The UART0/1 communication baud rate. */
14 #define DBG_UART_BAUDRATE       (115200)
15 
16 typedef enum {
17     DBG_PRINTF_NONE = 0,
18     DBG_PRINTF_UART0,
19     DBG_PRINTF_UART1,
20     DBG_PRINTF_INT_UART0,
21     DBG_PRINTF_INT_UART1,
22     DBG_PRINTF_ITM,
23     DBG_PRINTF_RTT,
24 } dbg_printf_mode_t;
25 
26 void dbg_printf_set_mode(dbg_printf_mode_t mode);
27 uint8_t dbg_printf_uart_callback(uart_regs_t *UARTx);
28 uint32_t dbg_printf_uart_flush(void);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif /* DBG_PRINTF_H_ */
35