/AliOS-Things-master/hardware/board/haas100/drivers/ |
A D | ch395_spi.c | 162 TRACE("spi %d open succ", spi->port); in hal_ch395_spi_init() 243 ret = spi_ctx[spi->port].spi_dma_send(data, 1, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_ch395() 266 ret = spi_ctx[spi->port].spi_dma_send(data + 1, size - 1, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_ch395() 338 ret = spi_ctx[spi->port].spi_dma_send(data, 1, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_ch395_sockdata() 359 ret = spi_ctx[spi->port].spi_dma_send(data + 1, 3, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_ch395_sockdata() 380 ret = spi_ctx[spi->port].spi_dma_send(data + 4, size - 4, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_ch395_sockdata() 451 ret = spi_ctx[spi->port].spi_dma_send(tx_data, 1, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_and_recv_ch395_normal() 473 ret = spi_ctx[spi->port].spi_dma_send(tx_data + 1, tx_size - 1, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_and_recv_ch395_normal() 500 ret = spi_ctx[spi->port].spi_dma_recv(cmd, rx_data, remainder, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_and_recv_ch395_normal() 563 ret = spi_ctx[spi->port].spi_dma_send(&tx_data[0], 1, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_and_recv_ch395_exist() [all …]
|
A D | do.c | 51 int32_t expansion_board_do_high(uint8_t port) in expansion_board_do_high() argument 55 if (port >= DO_PORT_SIZE) { in expansion_board_do_high() 56 LOGE(TAG, "%s %d invalid input port %d", __FUNCTION__, __LINE__, port); in expansion_board_do_high() 60 if (gpio_dev_output[port].installed == 0) { in expansion_board_do_high() 61 LOGE(TAG, "%s %d port %d haven't init yet", __FUNCTION__, __LINE__, port); in expansion_board_do_high() 66 ret = hal_gpio_output_low(&gpio_dev_output[port].gpio_dev); in expansion_board_do_high() 75 int32_t expansion_board_do_low(uint8_t port) in expansion_board_do_low() argument 79 if (port >= DO_PORT_SIZE) { in expansion_board_do_low() 80 LOGE(TAG, "%s %d invalid input port %d", __FUNCTION__, __LINE__, port); in expansion_board_do_low() 84 if (gpio_dev_output[port].installed == 0) { in expansion_board_do_low() [all …]
|
A D | di.c | 40 if (gpio_dev_input[i].gpio_dev.port == iomux) { in get_di_port_by_iomux() 51 uint8_t port = 0; in di_interrup_proc() local 61 port = *(uint8_t *)arg; in di_interrup_proc() 62 ret = get_di_port_by_iomux(port, &diport); in di_interrup_proc() 64 LOGE(TAG, "can not porc iomux %d interrupt", port); in di_interrup_proc() 69 LOGE(TAG, "di port %d iomux %d haven't init yet", diport, port); in di_interrup_proc() 198 int32_t expansion_board_di_get_value(uint8_t port, gpio_pinstate_t *value) in expansion_board_di_get_value() argument 202 if (port >= DI_PORT_SIZE || NULL == value) { in expansion_board_di_get_value() 207 if (gpio_dev_input[port].installed == 0) { in expansion_board_di_get_value() 208 LOGE(TAG, "DI port %d haven't init yet", port); in expansion_board_di_get_value() [all …]
|
A D | mux_i2c.c | 29 dev_cfg.pca9544_ch = port; in haas_mux_i2c_init() 37 if((i2c->port != DFT_MCU_I2C_PORT)) in haas_mux_i2c_init() 40 i2c->port = 1; in haas_mux_i2c_init() 85 if((i2c->port != DFT_MCU_I2C_PORT)) in haas_mux_i2c_reg_write() 88 i2c->port = DFT_MCU_I2C_PORT; in haas_mux_i2c_reg_write() 126 if((i2c->port != DFT_MCU_I2C_PORT)) in haas_mux_i2c_reg_read() 129 i2c->port = DFT_MCU_I2C_PORT; in haas_mux_i2c_reg_read() 163 if((i2c->port != DFT_MCU_I2C_PORT)) in haas_mux_i2c_data_send() 166 i2c->port = DFT_MCU_I2C_PORT; in haas_mux_i2c_data_send() 201 if((i2c->port != DFT_MCU_I2C_PORT)) in haas_mux_i2c_data_recv() [all …]
|
/AliOS-Things-master/hardware/chip/haas1000/hal/ |
A D | spi.c | 165 TRACE("spi %d open error", spi->port); in hal_spi_init() 174 TRACE("spi %d open succ", spi->port); in hal_spi_init() 178 if (spi->port == 0) in hal_spi_init() 192 if (!spi_ctx[spi->port].spi_mutex_id) in hal_spi_init() 194 if (spi->port == 0) in hal_spi_init() 203 if (!spi_ctx[spi->port].spi_mutex_id) in hal_spi_init() 271 ret = spi_ctx[spi->port].spi_dma_send(buf, len, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send() 355 ret = spi_ctx[spi->port].spi_dma_recv(cmd, data, remainder, spi_ctx[spi->port].spi_dma_irq); in hal_spi_recv() 431 ret = spi_ctx[spi->port].spi_dma_recv(cmd, rx_data, remainder, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_and_recv() 507 ret = spi_ctx[spi->port].spi_dma_send(tx_data, 1, spi_ctx[spi->port].spi_dma_irq); in hal_spi_send_recv() [all …]
|
A D | gpio.c | 11 uint8_t port; member 32 if (gpio->port >= HAL_IOMUX_PIN_LED_NUM) { in hal_gpio_init() 36 cfg_hw_gpio.pin = gpio->port; in hal_gpio_init() 117 *value = hal_gpio_pin_get_val(gpio->port); in hal_gpio_input_get() 147 if (hdl_pointer->port == pin) { in bes_gpio_irq_hdl() 175 if (gpio->port >= HAL_GPIO_PIN_NUM) { in hal_gpio_enable_irq() 181 bes_gpio_irq_handler[gpio->port].port = gpio->port; in hal_gpio_enable_irq() 183 bes_gpio_irq_handler[gpio->port].arg = arg; in hal_gpio_enable_irq() 191 hal_gpio_setup_irq(gpio->port, &gpiocfg); in hal_gpio_enable_irq() 214 hal_gpio_setup_irq(gpio->port, &gpiocfg); in hal_gpio_disable_irq() [all …]
|
A D | adc.c | 14 static enum HAL_GPADC_CHAN_T __hal_adc_port2chan(uint8_t port) in __hal_adc_port2chan() argument 16 return (port<3) ? port+HAL_GPADC_CHAN_2 : HAL_GPADC_CHAN_QTY; in __hal_adc_port2chan() 30 hal_gpadc_open(__hal_adc_port2chan(adc->port), HAL_GPADC_ATP_NULL, NULL); in hal_adc_init() 32 hal_gpadc_open(__hal_adc_port2chan(adc->port), HAL_GPADC_ATP_ONESHOT, __hal_adc_irqhandler); in hal_adc_init() 50 hal_gpadc_open(__hal_adc_port2chan(adc->port), HAL_GPADC_ATP_ONESHOT, NULL); in hal_adc_value_get() 53 if (output && hal_gpadc_get_volt(__hal_adc_port2chan(adc->port), &volt)) { in hal_adc_value_get() 70 hal_gpadc_close(__hal_adc_port2chan(adc->port)); in hal_adc_finalize()
|
/AliOS-Things-master/hardware/chip/rtl872xd/hal/ |
A D | hal_spi.c | 82 int port = spi->port; in hal_spi_init() local 101 spi_init(spi_dev[port].dev, spi_dev[port].spi_mosi, in hal_spi_init() 102 spi_dev[port].spi_miso, in hal_spi_init() 103 spi_dev[port].spi_sclk, spi_dev[port].spi_cs); in hal_spi_init() 112 int port = spi->port; in hal_spi_send() local 122 …spi_irq_hook(spi_dev[port].dev,(spi_irq_handler) Slave_tr_done_callback, (uint32_t)spi_dev[port].d… in hal_spi_send() 126 …spi_irq_hook(spi_dev[port].dev,(spi_irq_handler) Master_tr_done_callback, (uint32_t)spi_dev[port].… in hal_spi_send() 146 int port = spi->port; in hal_spi_recv() local 182 int port = spi->port; in hal_spi_send_recv() local 187 …spi_irq_hook(spi_dev[port].dev,(spi_irq_handler) Master_tr_done_callback, (uint32_t)spi_dev[port].… in hal_spi_send_recv() [all …]
|
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 …]
|
A D | gpio.c | 129 if(!gpio || gpio->port >= GPIO_NUM_PINS) in hal_gpio_init() 133 uint8_t pin = gpio_remap[gpio->port]; in hal_gpio_init() 169 if(!gpio || gpio->port >= GPIO_NUM_PINS) in hal_gpio_deinit() 179 if(!gpio || gpio->port >= GPIO_NUM_PINS) in hal_gpio_output_high() 189 if(!gpio || gpio->port >= GPIO_NUM_PINS) in hal_gpio_output_low() 199 if(!gpio || gpio->port >= GPIO_NUM_PINS) in hal_gpio_output_toggle() 202 gpio_write(&gpio_objs[gpio->port].gpio_obj, !gpio_read(&gpio_objs[gpio->port].gpio_obj)); in hal_gpio_output_toggle() 219 if(!gpio || gpio->port >= GPIO_NUM_PINS) in hal_gpio_get() 227 if(!gpio || gpio->port >= GPIO_NUM_PINS) in hal_gpio_enable_irq() 231 uint8_t pin = gpio_remap[gpio->port]; in hal_gpio_enable_irq() [all …]
|
A D | i2c.c | 44 if(NULL == i2c || (MICO_I2C_1 != i2c->port && MICO_I2C_2 != i2c->port)) { in hal_i2c_init() 48 i2c_resource_t * resource = &g_dev[i2c->port]; in hal_i2c_init() 71 if(NULL == i2c || (NULL == data) ||(MICO_I2C_1 != i2c->port && MICO_I2C_2 != i2c->port)) { in hal_i2c_master_send() 74 i2c_resource_t * resource = &g_dev[i2c->port]; in hal_i2c_master_send() 89 if(NULL == i2c || (NULL == data) || (MICO_I2C_1 != i2c->port && MICO_I2C_2 != i2c->port)) { in hal_i2c_master_recv() 92 i2c_resource_t * resource = &g_dev[i2c->port]; in hal_i2c_master_recv() 106 if(NULL == i2c || (NULL == data) || (MICO_I2C_1 != i2c->port && MICO_I2C_2 != i2c->port)) { in hal_i2c_slave_send() 109 i2c_resource_t * resource = &g_dev[i2c->port]; in hal_i2c_slave_send() 121 if(NULL == i2c || (NULL == data) || (MICO_I2C_1 != i2c->port && MICO_I2C_2 != i2c->port)) { in hal_i2c_slave_recv() 124 i2c_resource_t * resource = &g_dev[i2c->port]; in hal_i2c_slave_recv()
|
/AliOS-Things-master/hardware/board/haaseduk1/drivers/ |
A D | do.c | 42 gpio_dev_output[i].gpio_dev.port, ret); in expansion_board_do_init() 59 int32_t expansion_board_do_high(uint8_t port) in expansion_board_do_high() argument 63 if (port >= DO_PORT_SIZE) { in expansion_board_do_high() 68 if (gpio_dev_output[port].installed == 0) { in expansion_board_do_high() 70 port); in expansion_board_do_high() 78 __LINE__, port, ret); in expansion_board_do_high() 85 int32_t expansion_board_do_low(uint8_t port) in expansion_board_do_low() argument 89 if (port >= DO_PORT_SIZE) { in expansion_board_do_low() 94 if (gpio_dev_output[port].installed == 0) { in expansion_board_do_low() 96 port); in expansion_board_do_low() [all …]
|
A D | di.c | 40 if (gpio_dev_input[i].gpio_dev.port == iomux) { in get_di_port_by_iomux() 51 uint8_t port = 0; in di_interrup_proc() local 61 port = *(uint8_t *)arg; in di_interrup_proc() 62 ret = get_di_port_by_iomux(port, &diport); in di_interrup_proc() 164 gpio_dev_input[i].gpio_dev.port, ret); in expansion_board_di_init() 171 gpio_dev_input[i].gpio_dev.port, ret); in expansion_board_di_init() 189 gpio_dev_input[i].gpio_dev.port, ret); in expansion_board_di_init() 216 if (port >= DI_PORT_SIZE || NULL == value) { in expansion_board_di_get_value() 221 if (gpio_dev_input[port].installed == 0) { in expansion_board_di_get_value() 222 LOGE(TAG, "DI port %d haven't init yet", port); in expansion_board_di_get_value() [all …]
|
A D | exp_adc.c | 48 int32_t expansion_board_adc_get_value(uint32_t port, uint32_t *adc_value) in expansion_board_adc_get_value() argument 58 if (port >= ADC_PORT_SIZE || NULL == adc_value) { in expansion_board_adc_get_value() 59 LOGE(TAG, "%s %d invalid input port %d", __FILE__, __LINE__, port); in expansion_board_adc_get_value() 63 if (exp_adc_dev[port].installed == 0) { in expansion_board_adc_get_value() 64 LOGE(TAG, "exp adc %d haven't init yet , get value fail", port); in expansion_board_adc_get_value() 67 ret = hal_adc_value_get(&exp_adc_dev[port].st_adc_info, adc_value, ADC_DEFAULT_TIMEOUT); in expansion_board_adc_get_value() 69 LOGE(TAG, "Get adc %d port value fail ", port); in expansion_board_adc_get_value() 76 int32_t board_get_voltage(uint32_t port, uint32_t *output) in board_get_voltage() argument 89 ret = expansion_board_adc_get_value(port, &adc_value); in board_get_voltage() 91 LOGE(TAG, "Get adc %d port value fail ", port); in board_get_voltage()
|
/AliOS-Things-master/hardware/board/haaseduk1/drivers/sensor/ |
A D | sensor_i2c_api.c | 17 if (port >= EDU_MAX_I2C_PORT) in sensor_i2c_open() 20 p_fd = &g_i2c_fd[port]; in sensor_i2c_open() 28 snprintf(name, sizeof(name), "/dev/i2c%d", port); in sensor_i2c_open() 59 p_fd = &g_i2c_fd[port]; in sensor_i2c_master_send() 60 if ((port >= EDU_MAX_I2C_PORT) || (*p_fd < 0)) in sensor_i2c_master_send() 84 p_fd = &g_i2c_fd[port]; in sensor_i2c_master_recv() 85 if ((port >= EDU_MAX_I2C_PORT) || (*p_fd < 0)) in sensor_i2c_master_recv() 109 p_fd = &g_i2c_fd[port]; in sensor_i2c_mem_write() 133 p_fd = &g_i2c_fd[port]; in sensor_i2c_mem_read() 150 int32_t sensor_i2c_close(uint32_t port) in sensor_i2c_close() argument [all …]
|
/AliOS-Things-master/hardware/board/haaseduk1/board_test/ |
A D | adc_test.c | 25 static int32_t adc_test_process(uint32_t port) in adc_test_process() argument 34 ret = hal_adc_init(&edu_adc_dev[port].st_adc_info); in adc_test_process() 41 hal_adc_value_get(&edu_adc_dev[port].st_adc_info, &output, 1000); in adc_test_process() 56 hal_adc_finalize(&edu_adc_dev[port].st_adc_info); in adc_test_process() 61 if (port != 0) { in adc_test_process() 62 …g - edu_adc_dev[port].test_jitter) > edu_adc_dev[port].test_threshold) || ((test_avrg + edu_adc_de… in adc_test_process() 80 static int adc_autotest(uint32_t port) in adc_autotest() argument 92 ret = adc_test_process(port); in adc_autotest() 117 int adc_test(uint32_t port) in adc_test() argument 120 return adc_autotest(port); in adc_test()
|
A D | uart_test.c | 14 static int32_t uart_test_common(uint8_t port, uint32_t baud) in uart_test_common() argument 23 uart_ttl.port = port; /*ttl use uart 2*/ in uart_test_common() 31 printf("\r\n ====start uart %d test baudrate %d ====\r\n", port, baud); in uart_test_common() 33 if (port >= 3) { in uart_test_common() 34 printf("\r\n ======= Invalid uart part %d =====\r\n", port); in uart_test_common() 37 if (init_flag[port] == 0) { in uart_test_common() 41 init_flag[port] = 1; in uart_test_common() 44 printf("=====uart test : uart %d dev init fail =====\r\n", port); in uart_test_common() 51 printf("=====uart test : uart %d fail to send test data=====\r\n", port); in uart_test_common() 74 printf("=====uart test : uart %d test fail =====\r\n", uart_ttl.port); in uart_test_common() [all …]
|
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/common/mbed/targets/hal/rtl8721d/ |
A D | port_api.c | 49 PinName port_pin(PortName port, int pin_n) in port_pin() argument 51 return (PinName)(port << 5 | pin_n); in port_pin() 66 void port_init(port_t *obj, PortName port, int mask, PinDirection dir) in port_init() argument 68 assert_param(port < GPIO_PORT_NUM); in port_init() 70 obj->port = port; in port_init() 87 GPIO_PortDirection(obj->port, obj->mask, GPIO_Mode_OUT); in port_dir() 89 GPIO_PortDirection(obj->port, obj->mask, GPIO_Mode_IN); in port_dir() 110 pin_mode((obj->port << 5 | pin_idx), mode); in port_mode() 124 GPIO_PortWrite(obj->port, obj->mask, value); in port_write() 135 u32 value = GPIO_PortRead(obj->port, obj->mask); in port_read()
|
/AliOS-Things-master/components/ble_host/bt_host/ |
A D | build.mk | 35 L_SRCS += port/core/buf.c \ 36 port/core/atomic_c.c \ 40 L_SRCS += port/csi/csi_port.c \ 41 port/csi/work.c 42 L_INCS += $(L_PATH)/port/csi 44 L_SRCS += port/aos/aos_port.c \ 45 port/aos/work.c \ 46 port/aos/poll.c 47 L_INCS += $(L_PATH)/port/aos 126 $(L_PATH)/port/core/settings/include [all …]
|
/AliOS-Things-master/components/drivers/external_device/pca9544/src/ |
A D | pca9544_i2c_drv.c | 29 if (i2c->port >= I2C_PORT_MAX) { in pca9544_i2c_init() 33 p_fd = &g_i2c_fd[i2c->port]; in pca9544_i2c_init() 91 if (i2c->port >= I2C_PORT_MAX) { in pca9544_i2c_master_send() 95 p_fd = &g_i2c_fd[i2c->port]; in pca9544_i2c_master_send() 136 if (i2c->port >= I2C_PORT_MAX) { in pca9544_i2c_master_recv() 140 p_fd = &g_i2c_fd[i2c->port]; in pca9544_i2c_master_recv() 181 if (i2c->port >= I2C_PORT_MAX) { in pca9544_i2c_mem_write() 185 p_fd = &g_i2c_fd[i2c->port]; in pca9544_i2c_mem_write() 225 if (i2c->port >= I2C_PORT_MAX) { in pca9544_i2c_mem_read() 229 p_fd = &g_i2c_fd[i2c->port]; in pca9544_i2c_mem_read() [all …]
|
/AliOS-Things-master/components/SDL2/src/image/external/tiff-4.0.9/tools/ |
A D | CMakeLists.txt | 33 target_link_libraries(fax2ps tiff port) 36 target_link_libraries(fax2tiff tiff port) 39 target_link_libraries(pal2rgb tiff port) 42 target_link_libraries(ppm2tiff tiff port) 45 target_link_libraries(raw2tiff tiff port) 54 target_link_libraries(tiff2bw tiff port) 57 target_link_libraries(tiff2pdf tiff port) 60 target_link_libraries(tiff2ps tiff port) 66 target_link_libraries(tiffcmp tiff port) 69 target_link_libraries(tiffcp tiff port) [all …]
|
/AliOS-Things-master/components/lwip/lwip2.0.0/apps/tftp/ |
A D | tftp_server.c | 74 u16_t port; member 92 tftp_state.port = 0; in close_handle() 165 if (((tftp_state.port != 0) && (port != tftp_state.port)) || in recv() 167 tftp_send_error(tftp_state.upcb, addr, port, in recv() 189 tftp_send_error(tftp_state.upcb, addr, port, in recv() 199 tftp_send_error(tftp_state.upcb, addr, port, in recv() 208 tftp_send_error(tftp_state.upcb, addr, port, in recv() 218 tftp_send_error(tftp_state.upcb, addr, port, in recv() 229 tftp_state.port = port; in recv() 318 tftp_send_error(tftp_state.upcb, addr, port, in recv() [all …]
|
A D | tftp_client.c | 23 uint16_t port; member 91 pstate->port = port; in recv() 95 if ( port != pstate->port || !ip_addr_cmp(&pstate->addr, addr) ) { in recv() 96 tftp_send_error(pstate->upcb, addr, port, in recv() 122 tftp_send_error(pstate->upcb, addr, port, in recv() 233 uint16_t port = aos_rand() % 16384 + 49152; in tftp_client_get() local 234 ret = udp_bind(pcb, IP4_ADDR_ANY, port); in tftp_client_get() 256 pstate->port = tftp_port; in tftp_client_get() 257 ret = udp_sendto(pcb, p, paddr, pstate->port); in tftp_client_get() 279 void tftp_client_set_server_port(uint16_t port) in tftp_client_set_server_port() argument [all …]
|
/AliOS-Things-master/components/py_engine/engine/tools/ |
A D | metrics.py | 142 for port in port_data.values(): 143 if key == "ports/{}/{}".format(port.dir, port.output): 144 name = port.name 181 for port in ports: 182 syscmd("make", "-C", "ports/{}".format(port.dir), port.make_flags, "clean") 190 if any(port.needs_mpy_cross for port in ports): 195 for port in ports: 196 syscmd("make", "-C", "ports/{}".format(port.dir), MAKE_FLAGS, port.make_flags) 207 for port in ports: 208 syscmd("size", "ports/{}/{}".format(port.dir, port.output))
|
/AliOS-Things-master/components/drivers/peripheral/i2c/example/ |
A D | i2c_example.c | 20 snprintf(name, sizeof(name), "/dev/i2c%d", port); in vfs_i2c_test() 109 slave = aos_i2c_open(port, &config); in aos_i2c_test() 111 printf("i2c%d open failed\r\n", port); in aos_i2c_test() 125 port, slave_addr, tx_buffer, tx_cnt); in aos_i2c_test() 141 port, slave_addr, rx_buffer, rx_cnt); in aos_i2c_test() 159 int32_t port = argc > 1 ? atoi(argv[1]) : 1; in i2c_write_test() local 192 int32_t port = argc > 1 ? atoi(argv[1]) : 1; in i2c_read_test() local 232 slave = aos_i2c_open(port, &config); in aos_i2c_mem_test() 234 printf("i2c%d open failed\r\n", port); in aos_i2c_mem_test() 283 int32_t port = argc > 1 ? atoi(argv[1]) : 1; in i2c_mem_read_test() local [all …]
|