• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 HPMicro
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef _HPM_DEBUG_CONSOLE_H
9 #define _HPM_DEBUG_CONSOLE_H
10 #include "hpm_common.h"
11 
12 #define CONSOLE_TYPE_UART 0
13 
14 typedef struct {
15     uint32_t type;
16     uint32_t base;
17     uint32_t src_freq_in_hz;
18     uint32_t baudrate;
19 } console_config_t;
20 
21 
22 #if defined(__cplusplus)
23 extern "C" {
24 #endif /* __cplusplus */
25 
26 hpm_stat_t console_init(console_config_t *cfg);
27 
28 uint8_t console_receive_byte(void);
29 
30 void console_send_byte(uint8_t c);
31 
32 #if defined(__cplusplus)
33 }
34 #endif /* __cplusplus */
35 
36 #endif /* _HPM_CONSOLE_H */
37