Home
last modified time | relevance | path

Searched refs:port (Results 1 – 25 of 90) sorted by relevance

1234

/lk-master/external/platform/lpc15xx/lpcopen/lpc_chip_15xx/inc/
A Dgpio_15xx.h221 pGPIO->DIR[port] |= pinMask; in Chip_GPIO_SetPortDIROutput()
260 return pGPIO->DIR[port]; in Chip_GPIO_GetPortDIR()
275 pGPIO->MASK[port] = mask; in Chip_GPIO_SetPortMask()
288 return pGPIO->MASK[port]; in Chip_GPIO_GetPortMask()
300 pGPIO->PIN[port] = value; in Chip_GPIO_SetPortValue()
311 return pGPIO->PIN[port]; in Chip_GPIO_GetPortValue()
323 pGPIO->MPIN[port] = value; in Chip_GPIO_SetMaskedPortValue()
334 return pGPIO->MPIN[port]; in Chip_GPIO_GetMaskedPortValue()
363 pGPIO->SET[port] = pins; in Chip_GPIO_SetPortOutHigh()
405 pGPIO->CLR[port] = pins; in Chip_GPIO_SetPortOutLow()
[all …]
/lk-master/platform/or1ksim/
A Duart.c25 *(volatile unsigned char *)(uart[port].base + (reg << uart[port].shift)) = data; in write_uart_reg()
29 return *(volatile unsigned char *)(uart[port].base + (reg << uart[port].shift)); in read_uart_reg()
102 void uart_init_port(int port, uint baud) { in uart_init_port() argument
106 write_uart_reg(port, UART_IER, 0); in uart_init_port()
111 write_uart_reg(port, UART_MCR, MCRVAL); in uart_init_port()
112 write_uart_reg(port, UART_FCR, FCRVAL); in uart_init_port()
122 int uart_putc(int port, char c ) { in uart_putc() argument
125 write_uart_reg(port, UART_THR, c); in uart_putc()
137 return read_uart_reg(port, UART_RHR); in uart_getc()
140 void uart_flush_tx(int port) { in uart_flush_tx() argument
[all …]
/lk-master/platform/zynq/
A Duart.c30 uint port = (uint)arg; in uart_irq() local
31 uintptr_t base = uart_to_ptr(port); in uart_irq()
102 int uart_putc(int port, char c) { in uart_putc() argument
103 DEBUG_ASSERT(port >= 0 && port < NUM_UARTS); in uart_putc()
115 int uart_getc(int port, bool wait) { in uart_getc() argument
116 DEBUG_ASSERT(port >= 0 && port < NUM_UARTS); in uart_getc()
125 void uart_flush_tx(int port) { in uart_flush_tx() argument
126 DEBUG_ASSERT(port >= 0 && port < NUM_UARTS); in uart_flush_tx()
129 void uart_flush_rx(int port) { in uart_flush_rx() argument
130 DEBUG_ASSERT(port >= 0 && port < NUM_UARTS); in uart_flush_rx()
[all …]
/lk-master/platform/qemu-virt-arm/
A Duart.c52 uint port = (uintptr_t)arg; in uart_irq() local
53 uintptr_t base = uart_to_ptr(port); in uart_irq()
64 if (port == DEBUG_UART) { in uart_irq()
120 int uart_putc(int port, char c) { in uart_putc() argument
121 uintptr_t base = uart_to_ptr(port); in uart_putc()
131 int uart_getc(int port, bool wait) { in uart_getc() argument
132 cbuf_t *rxbuf = &uart_rx_buf[port]; in uart_getc()
144 int uart_pputc(int port, char c) { in uart_pputc() argument
155 int uart_pgetc(int port) { in uart_pgetc() argument
166 void uart_flush_tx(int port) { in uart_flush_tx() argument
[all …]
/lk-master/dev/include/dev/
A Duart.h16 int uart_putc(int port, char c);
17 int uart_getc(int port, bool wait);
18 void uart_flush_tx(int port);
19 void uart_flush_rx(int port);
20 void uart_init_port(int port, uint baud);
23 int uart_pputc(int port, char c);
24 int uart_pgetc(int port);
/lk-master/tools/
A Dnetwork.c61 sa.sin_port = htons(port); in inet_listen()
70 static int inet_connect(in_addr_t addr, int type, unsigned port) { in inet_connect() argument
82 sa.sin_port = htons(port); in inet_connect()
91 int udp_listen(in_addr_t addr, unsigned port, int shared) { in udp_listen() argument
92 return inet_listen(addr, SOCK_DGRAM, port, shared); in udp_listen()
95 int udp_connect(in_addr_t addr, unsigned port) { in udp_connect() argument
96 return inet_connect(addr, SOCK_DGRAM, port); in udp_connect()
99 int tcp_listen(in_addr_t addr, unsigned port) { in tcp_listen() argument
100 return inet_listen(addr, SOCK_STREAM, port, 0); in tcp_listen()
103 int tcp_connect(in_addr_t addr, unsigned port) { in tcp_connect() argument
[all …]
/lk-master/external/platform/lpc15xx/lpcopen/lpc_chip_15xx/src/
A Dgpio_15xx.c71 void Chip_GPIO_WriteDirBit(LPC_GPIO_T *pGPIO, uint32_t port, uint8_t bit, bool setting) in Chip_GPIO_WriteDirBit() argument
74 pGPIO->DIR[port] |= 1UL << bit; in Chip_GPIO_WriteDirBit()
77 pGPIO->DIR[port] &= ~(1UL << bit); in Chip_GPIO_WriteDirBit()
93 void Chip_GPIO_SetPinDIR(LPC_GPIO_T *pGPIO, uint8_t port, uint8_t pin, bool output) in Chip_GPIO_SetPinDIR() argument
96 Chip_GPIO_SetPinDIROutput(pGPIO, port, pin); in Chip_GPIO_SetPinDIR()
99 Chip_GPIO_SetPinDIRInput(pGPIO, port, pin); in Chip_GPIO_SetPinDIR()
104 void Chip_GPIO_SetPortDIR(LPC_GPIO_T *pGPIO, uint8_t port, uint32_t pinMask, bool outSet) in Chip_GPIO_SetPortDIR() argument
107 Chip_GPIO_SetPortDIROutput(pGPIO, port, pinMask); in Chip_GPIO_SetPortDIR()
110 Chip_GPIO_SetPortDIRInput(pGPIO, port, pinMask); in Chip_GPIO_SetPortDIR()
/lk-master/kernel/include/kernel/
A Dport.h49 status_t port_create(const char *name, port_mode_t mode, port_t *port);
55 status_t port_open(const char *name, void *ctx, port_t *port);
64 status_t port_group_add(port_t group, port_t port);
68 status_t port_group_remove(port_t group, port_t port);
72 status_t port_write(port_t port, const port_packet_t *pk, size_t count);
78 status_t port_read(port_t port, lk_time_t timeout, port_result_t *result);
83 status_t port_destroy(port_t port);
89 status_t port_close(port_t port);
/lk-master/platform/stm32f2xx/
A Dgpio.c16 static GPIO_TypeDef *port_to_pointer(unsigned int port) { in port_to_pointer() argument
17 switch (port) { in port_to_pointer()
40 static void enable_port(unsigned int port) { in enable_port() argument
41 DEBUG_ASSERT(port <= GPIO_PORT_I); in enable_port()
44 RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA << port, ENABLE); in enable_port()
52 uint port = GPIO_PORT(nr); in gpio_config() local
55 enable_port(port); in gpio_config()
68 GPIO_PinAFConfig(port_to_pointer(port), pin, GPIO_AFNUM(flags)); in gpio_config()
83 GPIO_Init(port_to_pointer(port), &init); in gpio_config()
A Duart.c164 static USART_TypeDef *get_usart(int port) { in get_usart() argument
165 switch (port) { in get_usart()
185 static cbuf_t *get_rxbuf(int port) { in get_rxbuf() argument
186 switch (port) { in get_rxbuf()
206 int uart_putc(int port, char c) { in uart_putc() argument
207 USART_TypeDef *usart = get_usart(port); in uart_putc()
212 int uart_getc(int port, bool wait) { in uart_getc() argument
213 cbuf_t *rxbuf = get_rxbuf(port); in uart_getc()
219 void uart_flush_tx(int port) {} in uart_flush_tx() argument
221 void uart_flush_rx(int port) {} in uart_flush_rx() argument
[all …]
/lk-master/platform/stm32f4xx/
A Dgpio.c16 static GPIO_TypeDef *port_to_pointer(unsigned int port) { in port_to_pointer() argument
17 switch (port) { in port_to_pointer()
40 static void enable_port(unsigned int port) { in enable_port() argument
41 DEBUG_ASSERT(port <= GPIO_PORT_I); in enable_port()
44 RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA << port, ENABLE); in enable_port()
52 uint port = GPIO_PORT(nr); in gpio_config() local
55 enable_port(port); in gpio_config()
68 GPIO_PinAFConfig(port_to_pointer(port), pin, GPIO_AFNUM(flags)); in gpio_config()
83 GPIO_Init(port_to_pointer(port), &init); in gpio_config()
A Duart.c192 static USART_TypeDef *get_usart(int port) { in get_usart() argument
193 switch (port) { in get_usart()
216 static cbuf_t *get_rxbuf(int port) { in get_rxbuf() argument
217 switch (port) { in get_rxbuf()
240 int uart_putc(int port, char c) { in uart_putc() argument
241 USART_TypeDef *usart = get_usart(port); in uart_putc()
246 int uart_getc(int port, bool wait) { in uart_getc() argument
247 cbuf_t *rxbuf = get_rxbuf(port); in uart_getc()
253 void uart_flush_tx(int port) {} in uart_flush_tx() argument
255 void uart_flush_rx(int port) {} in uart_flush_rx() argument
[all …]
/lk-master/platform/bcm28xx/
A Duart.c52 uint port = (uint)arg; in uart_irq() local
53 uintptr_t base = uart_to_ptr(port); in uart_irq()
60 cbuf_t *rxbuf = &uart_rx_buf[port]; in uart_irq()
105 int uart_putc(int port, char c) { in uart_putc() argument
106 uintptr_t base = uart_to_ptr(port); in uart_putc()
116 int uart_getc(int port, bool wait) { in uart_getc() argument
117 cbuf_t *rxbuf = &uart_rx_buf[port]; in uart_getc()
126 void uart_flush_tx(int port) { in uart_flush_tx() argument
129 void uart_flush_rx(int port) { in uart_flush_rx() argument
132 void uart_init_port(int port, uint baud) { in uart_init_port() argument
/lk-master/platform/alterasoc/
A Duart.c51 uint port = (uint)arg; in uart_irq() local
52 uintptr_t base = uart_to_ptr(port); in uart_irq()
59 cbuf_t *rxbuf = uart_to_rxbuf(port); in uart_irq()
99 int uart_putc(int port, char c) { in uart_putc() argument
100 uintptr_t base = uart_to_ptr(port); in uart_putc()
115 int uart_getc(int port, bool wait) { in uart_getc() argument
116 cbuf_t *rxbuf = uart_to_rxbuf(port); in uart_getc()
125 void uart_flush_tx(int port) { in uart_flush_tx() argument
128 void uart_flush_rx(int port) { in uart_flush_rx() argument
131 void uart_init_port(int port, uint baud) { in uart_init_port() argument
/lk-master/platform/stm32f7xx/
A Duart.c225 int uart_putc(int port, char c) { in uart_putc() argument
226 struct uart_instance *u = uart[port]; in uart_putc()
227 if (port < 0 || port > NUM_UARTS || !u) in uart_putc()
237 int uart_getc(int port, bool wait) { in uart_getc() argument
239 if (port < 0 || port > NUM_UARTS || !u) in uart_getc()
248 int uart_pputc(int port, char c) { in uart_pputc() argument
249 return uart_putc(port, c); in uart_pputc()
252 int uart_pgetc(int port) { in uart_pgetc() argument
254 if (port < 0 || port > NUM_UARTS || !u) in uart_pgetc()
264 void uart_flush_tx(int port) {} in uart_flush_tx() argument
[all …]
A Dgpio.c15 static GPIO_TypeDef *port_to_pointer(unsigned int port) { in port_to_pointer() argument
16 DEBUG_ASSERT(port <= GPIO_PORT_K); in port_to_pointer()
18 switch (port) { in port_to_pointer()
45 static void enable_port(unsigned int port) { in enable_port() argument
46 DEBUG_ASSERT(port <= GPIO_PORT_K); in enable_port()
48 switch (port) { in enable_port()
89 uint port = GPIO_PORT(nr); in gpio_config() local
92 enable_port(port); in gpio_config()
127 HAL_GPIO_Init(port_to_pointer(port), &init); in gpio_config()
/lk-master/platform/stm32f0xx/
A Duart.c160 static cbuf_t *stm32_get_rxbuf(int port) { in stm32_get_rxbuf() argument
162 if (DEBUG_UART == port) { in stm32_get_rxbuf()
166 switch (port) { in stm32_get_rxbuf()
229 static stm32_usart_t *stm32_get_usart(int port) { in stm32_get_usart() argument
230 switch (port) { in stm32_get_usart()
254 int uart_putc(int port, char c) { in uart_putc() argument
260 int uart_getc(int port, bool wait) { in uart_getc() argument
261 cbuf_t *rxbuf = stm32_get_rxbuf(port); in uart_getc()
267 void uart_flush_tx(int port) {} in uart_flush_tx() argument
269 void uart_flush_rx(int port) {} in uart_flush_rx() argument
[all …]
/lk-master/platform/mediatek/mt6735/
A Duart.c108 void uart_flush_tx(int port) { in uart_flush_tx() argument
111 void uart_flush_rx(int port) { in uart_flush_rx() argument
114 void uart_init_port(int port, uint baud) { in uart_init_port() argument
117 int uart_putc(int port, char c) { in uart_putc() argument
118 while (!(DRV_Reg32(UART_LSR(port)) & UART_LSR_THRE)); in uart_putc()
121 mt_reg_sync_writel((unsigned int)'\r', UART_THR(port)); in uart_putc()
123 mt_reg_sync_writel((unsigned int)c, UART_THR(port)); in uart_putc()
128 int uart_getc(int port, bool wait) { in uart_getc() argument
129 while (!(DRV_Reg32(UART_LSR(port)) & UART_LSR_DR)); in uart_getc()
130 return (int)DRV_Reg32(UART_RBR(port)); in uart_getc()
A Ddebug.c16 int port = mtk_get_current_uart(); in _dputc() local
19 uart_putc(port, '\r'); in _dputc()
22 uart_putc(port, c); in _dputc()
27 int port = mtk_get_current_uart(); in dgetc() local
29 if ((_c = uart_getc(port, wait)) < 0) { in dgetc()
/lk-master/platform/mediatek/mt6797/
A Duart.c108 void uart_flush_tx(int port) { in uart_flush_tx() argument
111 void uart_flush_rx(int port) { in uart_flush_rx() argument
114 void uart_init_port(int port, uint baud) { in uart_init_port() argument
117 int uart_putc(int port, char c) { in uart_putc() argument
118 while (!(DRV_Reg32(UART_LSR(port)) & UART_LSR_THRE)); in uart_putc()
121 mt_reg_sync_writel((unsigned int)'\r', UART_THR(port)); in uart_putc()
123 mt_reg_sync_writel((unsigned int)c, UART_THR(port)); in uart_putc()
128 int uart_getc(int port, bool wait) { in uart_getc() argument
129 while (!(DRV_Reg32(UART_LSR(port)) & UART_LSR_DR)); in uart_getc()
130 return (int)DRV_Reg32(UART_RBR(port)); in uart_getc()
A Ddebug.c16 int port = mtk_get_current_uart(); in _dputc() local
19 uart_putc(port, '\r'); in _dputc()
22 uart_putc(port, c); in _dputc()
27 int port = mtk_get_current_uart(); in dgetc() local
29 if ((_c = uart_getc(port, wait)) < 0) { in dgetc()
/lk-master/platform/stm32f1xx/
A Dgpio.c16 static GPIO_TypeDef *port_to_pointer(unsigned int port) { in port_to_pointer() argument
17 switch (port) { in port_to_pointer()
36 static void enable_port(unsigned int port) { in enable_port() argument
37 DEBUG_ASSERT(port <= GPIO_PORT_G); in enable_port()
40 RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA << port, ENABLE); in enable_port()
48 uint port = GPIO_PORT(nr); in gpio_config() local
51 enable_port(port); in gpio_config()
78 GPIO_Init(port_to_pointer(port), &init); in gpio_config()
A Duart.c167 static USART_TypeDef *get_usart(int port) { in get_usart() argument
168 switch (port) { in get_usart()
188 static cbuf_t *get_rxbuf(int port) { in get_rxbuf() argument
189 switch (port) { in get_rxbuf()
209 int uart_putc(int port, char c) { in uart_putc() argument
210 USART_TypeDef *usart = get_usart(port); in uart_putc()
215 int uart_getc(int port, bool wait) { in uart_getc() argument
216 cbuf_t *rxbuf = get_rxbuf(port); in uart_getc()
222 void uart_flush_tx(int port) {} in uart_flush_tx() argument
224 void uart_flush_rx(int port) {} in uart_flush_rx() argument
[all …]
/lk-master/kernel/
A Dport.c123 if (!name || !port) in port_create()
176 *port = (void *)wp; in port_create()
181 if (!name || !port) in port_open()
242 *port = (void *)rp; in port_open()
298 if (!port || !group) in port_group_add()
332 if (!port || !group) in port_group_remove()
365 if (!port || !pk) in port_write()
434 if (!port || !result) in port_read()
469 if (!port) in port_destroy()
510 if (!port) in port_close()
[all …]
/lk-master/platform/rp20xx/
A Duart.c18 int uart_putc(int port, char c) {
22 int uart_getc(int port, bool wait) {
26 void uart_flush_tx(int port) {}
28 void uart_flush_rx(int port) {}
30 void uart_init_port(int port, uint baud) {}

Completed in 30 milliseconds

1234