MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / uart_get_base

Function uart_get_base

bsp/loongson/ls1cdev/libraries/ls1c_uart.c:40–102  ·  view source on GitHub ↗

* 获取指定串口模块的基地址 * @UARTx 串口编号 * @ret 基地址 */

Source from the content-addressed store, hash-verified

38 * @ret 基地址
39 */
40void *uart_get_base(ls1c_uart_t UARTx)
41{
42 void *base = NULL;
43
44 switch (UARTx)
45 {
46 case LS1C_UART00:
47 base = (void *)LS1C_UART00_BASE;
48 break;
49 case LS1C_UART01:
50 base = (void *)LS1C_UART01_BASE;
51 break;
52
53 case LS1C_UART1:
54 base = (void *)LS1C_UART1_BASE;
55 break;
56
57 case LS1C_UART2:
58 base = (void *)LS1C_UART2_BASE;
59 break;
60
61 case LS1C_UART3:
62 base = (void *)LS1C_UART3_BASE;
63 break;
64
65 case LS1C_UART4:
66 base = (void *)LS1C_UART4_BASE;
67 break;
68
69 case LS1C_UART5:
70 base = (void *)LS1C_UART5_BASE;
71 break;
72
73 case LS1C_UART6:
74 base = (void *)LS1C_UART6_BASE;
75 break;
76
77 case LS1C_UART7:
78 base = (void *)LS1C_UART7_BASE;
79 break;
80
81 case LS1C_UART8:
82 base = (void *)LS1C_UART8_BASE;
83 break;
84
85 case LS1C_UART9:
86 base = (void *)LS1C_UART9_BASE;
87 break;
88
89 case LS1C_UART10:
90 base = (void *)LS1C_UART10_BASE;
91 break;
92
93 case LS1C_UART11:
94 base = (void *)LS1C_UART11_BASE;
95 break;
96
97 default:

Callers 5

uart_initFunction · 0.70
uart_is_transmit_emptyFunction · 0.70
uart_putcFunction · 0.70
ls1c_uart_getcFunction · 0.50
uart_irq_handlerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected