WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
uart_porting.h
浏览该文件的文档.
1
9#ifndef UART_PORT_H
10#define UART_PORT_H
11#include <stdint.h>
12#include "td_type.h"
13#include "platform_core.h"
14#include "std_def.h"
15#include "debug_print.h"
16#include "errcode.h"
17
18#ifdef __cplusplus
19#if __cplusplus
20extern "C" {
21#endif /* __cplusplus */
22#endif /* __cplusplus */
23
30#define UART_CLOCK_FRQ 24000000
31
32#define UART_L_BAUDRATE 115200UL
33#define UART_BUS_MAX_NUM UART_BUS_MAX_NUMBER
34
35#define UART_SHADOW YES
36#define UART_DLF_SIZE 6
37#define UART_FIFO_ENABLED YES
38
43
48
56
62void uart_port_set_clock_value(uart_bus_t bus, uint32_t clock);
63
68
73
78
83
88
93
98
99#if defined(CONFIG_UART_SUPPORT_DMA)
106
113#endif /* CONFIG_UART_SUPPORT_DMA */
115
120
125uint32_t uart_porting_lock(uart_bus_t bus);
126
132void uart_porting_unlock(uart_bus_t bus, uint32_t irq_sts);
133
134#ifdef LOG_SUPPORT
140void log_uart_port_init(void);
141#endif
142#ifdef ASIC_SMOKE_TEST
143void uart2_init(uint32_t baud_rate);
144#endif
145
146#if defined(CONFIG_UART_SUPPORT_RX_THREAD)
147#if defined(CONFIG_UART_SUPPORT_RX_THREAD_DEBUG)
148void uart_rx_thread_debug_print(void);
149#endif
150#endif
151
152#if defined(AT_COMMAND)
153void at_uart_init(void);
154#endif
155
156uint32_t at_uart_get_rcv_cnt(void);
157void log_uart_port_write(const uint8_t *buffer, uint32_t length);
158errcode_t uart_port_save_bus_id(int32_t dbg_uart_bus, int32_t at_uart_bus, int32_t hso_uart_bus);
159
160#if defined(SW_UART_DEBUG)
161void sw_debug_uart_reinit(uint32_t baud_rate);
162#endif
167#ifdef __cplusplus
168#if __cplusplus
169}
170#endif /* __cplusplus */
171#endif /* __cplusplus */
172
173#endif
uart_bus_t
UART bus.
Definition platform_core.h:198
uint32_t errcode_t
Definition of error code.
Definition errcode.h:30
void irq_uart0_handler(void)
Handler of UART0 IRQ.
void uart_porting_unlock(uart_bus_t bus, uint32_t irq_sts)
uart unlock.
Definition uart_porting.c:671
void uart_port_register_irq(uart_bus_t bus)
Register the interrupt of uarts.
Definition uart_porting.c:209
uint32_t at_uart_get_rcv_cnt(void)
Definition uart_porting.c:320
void uart_port_set_clock_value(uart_bus_t bus, uint32_t clock)
set the bus clock of specified uart.
Definition uart_porting.c:116
uint8_t uart_port_get_dma_trans_src_handshaking(uart_bus_t bus)
Get the DMA source handshaking select of uart transfer.
Definition uart_porting.c:640
void at_uart_init(void)
Definition uart_porting.c:282
void log_uart_port_write(const uint8_t *buffer, uint32_t length)
Definition uart_porting.c:566
void irq_uart2_handler(void)
Handler of UART2 IRQ.
errcode_t uart_port_save_bus_id(int32_t dbg_uart_bus, int32_t at_uart_bus, int32_t hso_uart_bus)
Definition uart_porting.c:572
uint32_t uart_port_get_clock_value(uart_bus_t bus)
Get the bus clock of specified uart.
Definition uart_porting.c:122
void uart_port_config_pinmux(uart_bus_t bus)
Config the pinmux of the uarts above.
Definition uart_porting.c:145
uintptr_t uart_porting_base_addr_get(uart_bus_t bus)
Definition uart_porting.c:77
uint8_t uart_port_get_dma_trans_dest_handshaking(uart_bus_t bus)
Get the DMA destination handshaking select of uart transfer.
Definition uart_porting.c:625
void log_uart_port_init(void)
hso uart init
Definition uart_porting.c:537
void uart_port_set_pending_irq(uart_bus_t uart)
Force trigger uart interrupt.
void uart_port_register_hal_funcs(uart_bus_t bus)
Register hal funcs objects into hal_uart module.
Definition uart_porting.c:104
void irq_uart3_handler(void)
Handler of UART3 IRQ.
const uintptr_t g_uart_base_addrs[UART_BUS_MAX_NUMBER]
Base address list for all of the IPs.
Definition uart_porting.c:64
void uart_port_unregister_irq(uart_bus_t bus)
unRegister the interrupt of uarts.
Definition uart_porting.c:214
void sw_debug_uart_reinit(uint32_t baud_rate)
Definition uart_porting.c:381
#define UART_BUS_MAX_NUM
Definition uart_porting.h:33
void hal_uart_clear_pending(uart_bus_t uart)
void irq_uart1_handler(void)
Handler of UART1 IRQ.
uint32_t uart_porting_lock(uart_bus_t bus)
uart lock.
Definition uart_porting.c:656
unsigned int uintptr_t
Definition td_type.h:65