/AliOS-Things-master/components/py_engine/tests/pyb/ |
A D | uart.py | 11 uart = UART(1) variable 12 uart = UART(1, 9600) variable 14 print(uart) 16 uart.init(2400) 17 print(uart) 19 print(uart.any()) 25 uart.sendbreak() 36 print(uart) 38 print(uart) 42 print(uart) [all …]
|
/AliOS-Things-master/hardware/chip/rtl872xd/csi_driver/uart/ |
A D | uart.c | 117 uart->callback(uart, UART_EVENT_SEND_COMPLETE, NULL); in uart_irqhandler() 130 TransCnt = UART_ReceiveDataTO(UARTx, uart->rx_data, uart->rx_size, 1); in uart_irqhandler() 139 uart->callback(uart, UART_EVENT_RECEIVE_COMPLETE, NULL); in uart_irqhandler() 163 if (!uart) in csi_uart_init() 175 free(uart->priv); in csi_uart_init() 180 uart->dev.idx = idx; in csi_uart_init() 217 if (uart && uart->priv) { in csi_uart_uninit() 407 uart->callback(uart, UART_EVENT_SEND_COMPLETE, NULL); in csi_uart_send_async() 436 TransCnt = UART_ReceiveDataTO(UARTx, uart->rx_data, uart->rx_size, 1); in csi_uart_receive_async() 444 uart->callback(uart, UART_EVENT_RECEIVE_COMPLETE, NULL); in csi_uart_receive_async() [all …]
|
/AliOS-Things-master/hardware/chip/rtl872xd/hal/ |
A D | uart.c | 183 if(uart->port != 0){ in hal_uart_init() 194 if(uart_obj[uart->port].tx){ in hal_uart_init() 198 if(uart_obj[uart->port].rx){ in hal_uart_init() 203 if(uart_obj[uart->port].cts){ in hal_uart_init() 207 if(uart_obj[uart->port].rts){ in hal_uart_init() 211 if(uart_obj[uart->port].cts){ in hal_uart_init() 307 if(uart->port != 0){ in hal_uart_send() 344 if(uart->port != 0){ in hal_uart_recv_II() 350 _memcpy(data, uart_rxbuffer[uart->port].rxbuffer, uart_rxbuffer[uart->port].length); in hal_uart_recv_II() 355 …_memcpy(uart_rxbuffer[uart->port].rxbuffer,uart_rxbuffer[uart->port].rxbuffer+expect_size, uart_rx… in hal_uart_recv_II() [all …]
|
/AliOS-Things-master/components/amp_adapter/platform/aos/peripheral/ |
A D | aos_hal_uart.c | 24 int32_t aos_hal_uart_init(uart_dev_t *uart) in aos_hal_uart_init() argument 26 return hal_uart_init(uart); in aos_hal_uart_init() 73 uart_dev_t *uart; member 86 uart_dev_t *uart; in uart_recv_handler() local 94 uart = notify->uart; in uart_recv_handler() 122 if (uart_port_registered[uart->port]) in aos_hal_uart_callback() 124 hal_uart_receive_register(uart, cb, args); in aos_hal_uart_callback() 125 uart_port_registered[uart->port] = 1; in aos_hal_uart_callback() 141 notify->uart = uart; in aos_hal_uart_callback() 170 hal_uart_finalize(uart); in aos_hal_uart_finalize() [all …]
|
/AliOS-Things-master/components/csi/csi2/include/drv/ |
A D | usi_usart.h | 31 csi_error_t csi_usi_uart_init(csi_uart_t *uart, uint32_t idx); 38 void csi_usi_uart_uninit(csi_uart_t *uart); 47 csi_error_t csi_usi_uart_attach_callback(csi_uart_t *uart, void * cb, void *arg); 53 void csi_usi_uart_detach_callback(csi_uart_t *uart); 61 csi_error_t csi_usi_uart_baud(csi_uart_t *uart, uint32_t baud); 106 uint32_t csi_usi_uart_get_recvfifo_waiting_num(csi_uart_t *uart); 135 uint8_t csi_usi_uart_getchar(csi_uart_t *uart); 143 void csi_usi_uart_putchar(csi_uart_t *uart, uint8_t ch); 160 csi_error_t csi_usi_uart_get_state(csi_uart_t *uart, csi_state_t *state); 167 csi_error_t csi_usi_uart_enable_pm(csi_uart_t *uart); [all …]
|
A D | uart.h | 90 csi_error_t csi_uart_init(csi_uart_t *uart, uint32_t idx); 97 void csi_uart_uninit(csi_uart_t *uart); 112 void csi_uart_detach_callback(csi_uart_t *uart); 120 csi_error_t csi_uart_baud(csi_uart_t *uart, uint32_t baud); 130 csi_error_t csi_uart_format(csi_uart_t *uart, csi_uart_data_bits_t data_bits, 139 csi_error_t csi_uart_flowctrl(csi_uart_t *uart, csi_uart_flowctrl_t flowctrl); 184 uint8_t csi_uart_getc(csi_uart_t *uart); 191 void csi_uart_putc(csi_uart_t *uart, uint8_t ch); 208 csi_error_t csi_uart_get_state(csi_uart_t *uart, csi_state_t *state); 215 csi_error_t csi_uart_enable_pm(csi_uart_t *uart); [all …]
|
/AliOS-Things-master/components/ble_host/ble_profiles/ |
A D | uart_server.c | 105 if (!uart) { in event_char_ccc_change() 111 if ((uart->update_param_flag || uart->conn_update_def_on) && uart->conn_param != NULL) { in event_char_ccc_change() 112 ble_stack_connect_param_update(uart->conn_handle, (conn_param_t *)uart->conn_param); in event_char_ccc_change() 122 if (!uart) { in event_char_write() 127 uart->uart_recv(e->data, e->len); in event_char_write() 136 if (!uart) { in uart_server_disconn() 188 …if (!data || !length || !uart || uart->conn_handle < 0 || uart->server_data.tx_ccc_value != CCC_VA… in uart_server_send() 197 uint16_t send_count = (uart->mtu - 3) < count ? (uart->mtu - 3) : count; in uart_server_send() 290 if (!uart) { in uart_server_conn_param_update() 299 if (uart->conn_handle < 0) { in uart_server_conn_param_update() [all …]
|
A D | uart_client.c | 316 if (!uart) { in service_discovery() 338 if ((uart->update_param_flag || uart->conn_update_def_on) && uart->conn_param != NULL) { in service_discovery() 339 ble_stack_connect_param_update(uart->conn_handle, (conn_param_t *)uart->conn_param); in service_discovery() 375 if (!uart) { in event_notify() 456 ble_uart_client_t *uart = handle; in uart_client_send() local 458 …if (data == NULL || length <= 0 || !uart || uart->conn_handle < 0 || !uart->client_data.uart_profi… in uart_client_send() 467 uint16_t send_count = (uart->mtu - 3) < count ? (uart->mtu - 3) : count; in uart_client_send() 522 if (!uart) { in uart_client_disconn() 565 if (!uart) { in uart_client_conn_param_update() 574 if (uart->conn_handle < 0) { in uart_client_conn_param_update() [all …]
|
/AliOS-Things-master/components/py_engine/tests/wipy/ |
A D | uart.py | 32 print(uart) 40 uart = UART() variable 41 print(uart) 43 print(uart) 45 print(uart) 47 print(uart) 49 print(uart) 158 uart.deinit() 160 print(uart) 163 print(uart) [all …]
|
/AliOS-Things-master/hardware/chip/haas1000/csi/ |
A D | uart.c | 203 hal_uart_irq_set_dma_handler(id, uart->rx_handler, uart->tx_handler, NULL); in tty_uart_startup() 245 uart->rx_busy = true; in tty_uart_enable_rx() 246 start_rx_dma(uart); in tty_uart_enable_rx() 268 if (uart->tx_busy) in tty_uart_start_tx() 271 uart->tx_busy = true; in tty_uart_start_tx() 272 count = aos_tty_tx_buffer_consume(tty, uart->tx_buf, sizeof(uart->tx_buf)); in tty_uart_start_tx() 284 if (uart->tx_busy) { in tty_uart_stop_tx() 313 if (!uart->rx_busy) { in tty_uart_rx_handler() 319 start_rx_dma(uart); in tty_uart_rx_handler() 342 if (!uart->tx_busy) { in tty_uart_tx_handler() [all …]
|
/AliOS-Things-master/components/drivers/peripheral/uart/src/ |
A D | uart_dev.c | 50 uart_dev_t *uart = NULL; in uart_device_read() local 61 uart = &vu->dev; in uart_device_read() 83 uart_dev_t *uart = NULL; in uart_device_write() local 92 uart = &vu->dev; in uart_device_write() 296 uart = &vu->dev; in uart_device_ioctl() 347 uart = &vu->dev; in uart_device_open() 366 uart->priv = f; in uart_device_open() 393 uart = &vu->dev; in uart_device_close() 402 uart->priv = NULL; in uart_device_close() 414 if (!uart) { in uart_rx_notify() [all …]
|
/AliOS-Things-master/components/amp_adapter/include/peripheral/ |
A D | aos_hal_uart.h | 93 typedef int32_t (*uart_rx_cb)(uart_dev_t *uart); 105 int32_t aos_hal_uart_init(uart_dev_t *uart); 118 int32_t aos_hal_uart_send(uart_dev_t *uart, const void *data, uint32_t size, uint32_t timeout); 129 int32_t aos_hal_uart_send_poll(uart_dev_t *uart, const void *data, uint32_t size); 142 int32_t aos_hal_uart_recv(uart_dev_t *uart, void *data, uint32_t expect_size, uint32_t timeout); 156 int32_t aos_hal_uart_recv_poll(uart_dev_t *uart, void *data, uint32_t expect_size, uint32_t *recv_s… 171 int32_t aos_hal_uart_recv_II(uart_dev_t *uart, void *data, uint32_t expect_size, 183 int32_t aos_hal_uart_recv_cb_reg(uart_dev_t *uart, uart_rx_cb cb); 192 int32_t aos_hal_uart_finalize(uart_dev_t *uart); 204 int32_t aos_hal_uart_callback(uart_dev_t *uart, void (*cb)(int, void *, uint16_t, void *), void *ar…
|
/AliOS-Things-master/hardware/chip/smarth_rv64/hal/aos/hal/ |
A D | uart.h | 92 typedef int32_t (*uart_rx_cb)(uart_dev_t *uart); 102 int32_t hal_uart_init(uart_dev_t *uart); 115 int32_t hal_uart_send(uart_dev_t *uart, const void *data, uint32_t size, uint32_t timeout); 126 int32_t hal_uart_send_poll(uart_dev_t *uart, const void *data, uint32_t size); 139 int32_t hal_uart_recv(uart_dev_t *uart, void *data, uint32_t expect_size, uint32_t timeout); 153 int32_t hal_uart_recv_poll(uart_dev_t *uart, void *data, uint32_t expect_size); 168 int32_t hal_uart_recv_II(uart_dev_t *uart, void *data, uint32_t expect_size, 180 int32_t hal_uart_recv_cb_reg(uart_dev_t *uart, uart_rx_cb cb); 189 int32_t hal_uart_finalize(uart_dev_t *uart);
|
/AliOS-Things-master/components/drivers/peripheral/uart/include/aos/hal/ |
A D | uart.h | 96 typedef int32_t (*uart_rx_cb)(uart_dev_t *uart); 106 int32_t hal_uart_init(uart_dev_t *uart); 119 int32_t hal_uart_send(uart_dev_t *uart, const void *data, uint32_t size, uint32_t timeout); 130 int32_t hal_uart_send_poll(uart_dev_t *uart, const void *data, uint32_t size); 143 int32_t hal_uart_recv(uart_dev_t *uart, void *data, uint32_t expect_size, uint32_t timeout); 157 int32_t hal_uart_recv_poll(uart_dev_t *uart, void *data, uint32_t expect_size); 172 int32_t hal_uart_recv_II(uart_dev_t *uart, void *data, uint32_t expect_size, 184 int32_t hal_uart_recv_cb_reg(uart_dev_t *uart, uart_rx_cb cb); 193 int32_t hal_uart_finalize(uart_dev_t *uart);
|
/AliOS-Things-master/components/py_engine/tests/haas/HaaS100/python-apps/driver/uart/ |
A D | main.py | 9 uart = UART(); variable 10 uart.open("serial2") 12 uart.setBaudRate(9600) 15 uart.write(writeBuf) 18 recvSize = uart.read(readBuf) 22 uart.close()
|
/AliOS-Things-master/components/py_engine/tests/haas/HaaSEdu/python-apps/driver/uart/ |
A D | main.py | 9 uart = UART(); variable 10 uart.open("serial2") 12 uart.setBaudRate(9600) 15 uart.write(writeBuf) 18 recvSize = uart.read(readBuf) 22 uart.close()
|
/AliOS-Things-master/components/amp_adapter/platform/linux/peripheral/ |
A D | aos_hal_uart.c | 21 int32_t aos_hal_uart_callback(uart_dev_t *uart, void (*cb)(int, void *, uint16_t, void *), void *ar… in aos_hal_uart_callback() argument 43 uint8_t uart; member 62 int32_t aos_hal_uart_init(uart_dev_t *uart) in aos_hal_uart_init() argument 89 int32_t aos_hal_uart_finalize(uart_dev_t *uart) in aos_hal_uart_finalize() argument 91 _uart_drv_t *pdrv = &_uart_drv[uart->port]; in aos_hal_uart_finalize() 99 int32_t aos_hal_uart_send(uart_dev_t *uart, const void *data, uint32_t size, uint32_t timeout) in aos_hal_uart_send() argument 102 _uart_drv_t *pdrv = &_uart_drv[uart->port]; in aos_hal_uart_send() 116 int32_t aos_hal_uart_recv_poll(uart_dev_t *uart, void *data, uint32_t expect_size, uint32_t *recv_s… in aos_hal_uart_recv_poll() argument 122 (void *)uart; in aos_hal_uart_recv_poll() 141 int32_t aos_hal_uart_recv_II(uart_dev_t *uart, void *data, uint32_t expect_size, uint32_t *recv_siz… in aos_hal_uart_recv_II() argument [all …]
|
/AliOS-Things-master/hardware/chip/haas1000/hal/ |
A D | uart.c | 293 int32_t hal_uart_init(uart_dev_t *uart) in hal_uart_init() argument 300 if(NULL == uart || uart->port > HAL_UART_ID_2) { in hal_uart_init() 304 uart_id = uart->port; in hal_uart_init() 328 uart_cfg.parity = uart->config.parity; in hal_uart_init() 436 uart_id = uart->port; in hal_uart_send() 517 uart_id = uart->port; in hal_uart_recv_II() 611 if (NULL == uart) { in hal_uart_finalize() 616 uart_id = uart->port; in hal_uart_finalize() 633 hal_uart_close(uart->port); in hal_uart_finalize() 654 if (!uart || uart->port > HAL_UART_ID_2) in hal_uart_recv_cb_reg() [all …]
|
/AliOS-Things-master/hardware/chip/smarth_rv64/hal/ |
A D | uart.c | 26 int32_t hal_uart_init(uart_dev_t *uart) in hal_uart_init() argument 30 if(NULL == uart || uart->port != CONSOLE_IDX){ in hal_uart_init() 40 console_handle = csi_usart_initialize(uart->port, NULL); in hal_uart_init() 48 int32_t hal_uart_recv_II(uart_dev_t *uart, void *data, uint32_t expect_size, in hal_uart_recv_II() argument 90 int32_t hal_uart_send(uart_dev_t *uart, const void *data, uint32_t size, uint32_t timeout) in hal_uart_send() argument
|
/AliOS-Things-master/components/linkkit/include/linkkit/wrappers/ |
A D | wrappers_uart.h | 8 int32_t HAL_AT_Uart_Init(uart_dev_t *uart); 10 int32_t HAL_AT_Uart_Deinit(uart_dev_t *uart); 12 int32_t HAL_AT_Uart_Send(uart_dev_t *uart, const void *data, uint32_t size, 15 int32_t HAL_AT_Uart_Recv(uart_dev_t *uart, void *data, uint32_t expect_size,
|
A D | wrappers_atm.h | 39 int32_t HAL_AT_Uart_Init(uart_dev_t *uart); 48 int32_t HAL_AT_Uart_Deinit(uart_dev_t *uart); 61 int32_t HAL_AT_Uart_Send(uart_dev_t *uart, const void *data, uint32_t size, 77 int32_t HAL_AT_Uart_Recv(uart_dev_t *uart, void *data, uint32_t expect_size,
|
/AliOS-Things-master/components/drivers/peripheral/uart/ |
A D | README.md | 1 @page uart UART 3 [更正文档](https://gitee.com/alios-things/uart/edit/master/README.md)      [贡献说明](h… 18 │ │ └── uart.h # HAL API 116 - uart: master # helloworld_demo中引入uart组件 126 aos install uart 130 上述命令执行成功后,组件源码则被下载到了./components/drivers/peripheral/uart路径中。 133 uart组件的package.yaml中添加example
|
/AliOS-Things-master/components/amp/example-js/ |
A D | uart.js | 1 var uart = require('uart'); variable 5 var serial = uart.open({
|
/AliOS-Things-master/solutions/javascript_demo/board/haas600/ |
A D | uart.js | 1 import * as uart from 'uart' 27 var serial = uart.open({
|
/AliOS-Things-master/solutions/javascript_demo/board/haas-edu-k1/ |
A D | uart.js | 1 import * as uart from 'uart' 27 var serial = uart.open({
|