Home
last modified time | relevance | path

Searched refs:gpio (Results 1 – 25 of 63) sorted by relevance

123

/AliOS-Things-master/components/amp_adapter/platform/aos/peripheral/
A Daos_hal_gpio.c23 if (!gpio || gpio->port >= PLATFORM_GPIO_NUM) in aos_hal_gpio_init()
68 gpio->gpioc = gpioc; in aos_hal_gpio_init()
142 if (!gpio || gpio->port >= PLATFORM_GPIO_NUM) in aos_hal_gpio_output_high()
145 return aos_gpioc_set_value(gpio->gpioc, gpio->pin_index, 1); in aos_hal_gpio_output_high()
156 if (!gpio || gpio->port >= PLATFORM_GPIO_NUM) in aos_hal_gpio_output_low()
159 return aos_gpioc_set_value(gpio->gpioc, gpio->pin_index, 0); in aos_hal_gpio_output_low()
170 return aos_gpioc_toggle(gpio->gpioc, gpio->pin_index); in aos_hal_gpio_output_toggle()
180 return aos_gpioc_get_value(gpio->gpioc, gpio->pin_index); in aos_hal_gpio_get()
188 return aos_gpioc_get_value(gpio->gpioc, gpio->pin_index); in aos_hal_gpio_input_get()
285 if (!gpio || gpio->port >= PLATFORM_GPIO_NUM) in aos_hal_gpio_finalize()
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/csi_driver/gpio/
A Dgpio.c17 gpio->callback(gpio, pin_mask, gpio->arg); in user_interrupt_handler()
23 if(!gpio) in csi_gpio_init()
33 gpio->arg = NULL; in csi_gpio_init()
40 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_uninit()
54 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_dir()
76 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_mode()
113 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_irq_mode()
173 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_irq_enable()
190 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_write()
206 if (gpio->dev.idx != PORT_A && gpio->dev.idx != PORT_B) { in csi_gpio_toggle()
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/hal/
A Dgpio.c129 if(!gpio || gpio->port >= GPIO_NUM_PINS) in hal_gpio_init()
140 switch(gpio->config){ 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()
209 if(!gpio || gpio->port >= GPIO_NUM_PINS || !value) in hal_gpio_input_get()
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()
[all …]
/AliOS-Things-master/hardware/chip/haas1000/hal/
A Dgpio.c28 int32_t hal_gpio_init(gpio_dev_t *gpio) in hal_gpio_init() argument
32 if (gpio->port >= HAL_IOMUX_PIN_LED_NUM) { in hal_gpio_init()
36 cfg_hw_gpio.pin = gpio->port; in hal_gpio_init()
41 if ((gpio->config == OUTPUT_PUSH_PULL) || (gpio->config == OUTPUT_OPEN_DRAIN_PULL_UP) in hal_gpio_init()
42 || (gpio->config == INPUT_PULL_UP) || (gpio->config == IRQ_MODE)) { in hal_gpio_init()
61 int32_t hal_gpio_output_high(gpio_dev_t *gpio) in hal_gpio_output_high() argument
77 int32_t hal_gpio_output_low(gpio_dev_t *gpio) in hal_gpio_output_low() argument
115 if(NULL != gpio && NULL != value) { in hal_gpio_input_get()
128 if(NULL != gpio && NULL != value) { in hal_gpio_get()
175 if (gpio->port >= HAL_GPIO_PIN_NUM) { in hal_gpio_enable_irq()
[all …]
/AliOS-Things-master/hardware/chip/haas1000/csi/
A Dgpio.c17 if (!gpio) in csi_gpio_init()
25 gpio->arg = NULL; in csi_gpio_init()
36 if (!gpio) in csi_gpio_dir()
61 if (!gpio) in csi_gpio_mode()
110 if (!gpio) in csi_gpio_irq_mode()
141 gpio->callback(gpio, (uint32_t)1 << (pin % GPIO_PINS_PER_PORT), gpio->arg); in irq_handler()
146 if (!gpio) in csi_gpio_irq_enable()
181 if (!gpio) in csi_gpio_write()
199 if (!gpio) in csi_gpio_read()
217 if (!gpio) in csi_gpio_attach_callback()
[all …]
/AliOS-Things-master/components/csi/csi2/include/drv/
A Dgpio.h85 csi_error_t csi_gpio_init(csi_gpio_t *gpio, uint32_t port_idx);
93 void csi_gpio_uninit(csi_gpio_t *gpio);
102 csi_error_t csi_gpio_dir(csi_gpio_t *gpio, uint32_t pin_mask, csi_gpio_dir_t dir);
131 csi_error_t csi_gpio_irq_enable(csi_gpio_t *gpio, uint32_t pin_mask, bool enable);
140 csi_error_t csi_gpio_debonce(csi_gpio_t *gpio, uint32_t pin_mask, bool enable);
156 void csi_gpio_toggle(csi_gpio_t *gpio, uint32_t pin_mask);
164 uint32_t csi_gpio_read(csi_gpio_t *gpio, uint32_t pin_mask);
173 csi_error_t csi_gpio_attach_callback(csi_gpio_t *gpio, void *callback, void *arg);
180 void csi_gpio_detach_callback(csi_gpio_t *gpio);
187 csi_error_t csi_gpio_enable_pm(csi_gpio_t *gpio);
[all …]
/AliOS-Things-master/components/amp_adapter/platform/linux/peripheral/
A Daos_hal_gpio.c21 int32_t aos_hal_gpio_init(gpio_dev_t *gpio) in aos_hal_gpio_init() argument
27 int32_t aos_hal_gpio_output_high(gpio_dev_t *gpio) in aos_hal_gpio_output_high() argument
29 gpio_value[gpio->port] = 1; in aos_hal_gpio_output_high()
33 int32_t aos_hal_gpio_output_low(gpio_dev_t *gpio) in aos_hal_gpio_output_low() argument
35 gpio_value[gpio->port] = 0; in aos_hal_gpio_output_low()
39 int32_t aos_hal_gpio_output_toggle(gpio_dev_t *gpio) in aos_hal_gpio_output_toggle() argument
46 *value = gpio_value[gpio->port]; in aos_hal_gpio_input_get()
73 int32_t aos_hal_gpio_disable_irq(gpio_dev_t *gpio) in aos_hal_gpio_disable_irq() argument
78 int32_t aos_hal_gpio_clear_irq(gpio_dev_t *gpio) in aos_hal_gpio_clear_irq() argument
80 return aos_hal_gpio_disable_irq(gpio); in aos_hal_gpio_clear_irq()
[all …]
/AliOS-Things-master/components/py_engine/tests/haas/HaaS100/python-apps/driver/led/
A Dmain.py7 gpio = GPIO() variable
11 gpio.open(led)
12 gpio.write(1)
14 value = gpio.read()
16 gpio.write(0)
18 value = gpio.read()
20 gpio.write(1)
22 value = gpio.read()
24 gpio.close()
/AliOS-Things-master/components/py_engine/tests/haas/HaaS200/python-apps/driver/led/
A Dmain.py7 gpio = GPIO() variable
11 gpio.open(led)
12 gpio.write(1)
14 value = gpio.read()
16 gpio.write(0)
18 value = gpio.read()
20 gpio.write(1)
22 value = gpio.read()
24 gpio.close()
/AliOS-Things-master/components/amp_adapter/include/peripheral/
A Daos_hal_gpio.h95 int32_t aos_hal_gpio_init(gpio_dev_t *gpio);
106 int32_t aos_hal_gpio_output_high(gpio_dev_t *gpio);
117 int32_t aos_hal_gpio_output_low(gpio_dev_t *gpio);
127 int32_t aos_hal_gpio_output_toggle(gpio_dev_t *gpio);
138 int32_t aos_hal_gpio_get(gpio_dev_t *gpio);
149 int32_t aos_hal_gpio_input_get(gpio_dev_t *gpio, uint32_t *value);
164 int32_t aos_hal_gpio_enable_irq(gpio_dev_t *gpio, gpio_irq_trigger_t trigger,
176 int32_t aos_hal_gpio_disable_irq(gpio_dev_t *gpio);
186 int32_t aos_hal_gpio_clear_irq(gpio_dev_t *gpio);
195 int32_t aos_hal_gpio_finalize(gpio_dev_t *gpio);
/AliOS-Things-master/components/drivers/peripheral/gpio/include/aos/hal/
A Dgpio.h87 int32_t hal_gpio_init(gpio_dev_t *gpio);
98 int32_t hal_gpio_output_high(gpio_dev_t *gpio);
109 int32_t hal_gpio_output_low(gpio_dev_t *gpio);
119 int32_t hal_gpio_output_toggle(gpio_dev_t *gpio);
130 int32_t hal_gpio_input_get(gpio_dev_t *gpio, uint32_t *value);
144 int32_t hal_gpio_enable_irq(gpio_dev_t *gpio, gpio_irq_trigger_t trigger,
156 int32_t hal_gpio_disable_irq(gpio_dev_t *gpio);
166 int32_t hal_gpio_clear_irq(gpio_dev_t *gpio);
175 int32_t hal_gpio_finalize(gpio_dev_t *gpio);
/AliOS-Things-master/components/py_engine/tests/haas/HaaS100/python-apps/driver/gpio/
A Dmain.py11 gpio = GPIO() variable
12 gpio.open("GPIO23")
13 gpio.enableIrq(cb)
15 gpio.disableIrq(cb)
16 gpio.clearIrq(cb)
17 gpio.close()
/AliOS-Things-master/components/py_engine/tests/haas/HaaS200/python-apps/driver/gpio/
A Dmain.py11 gpio = GPIO() variable
12 gpio.open("GPIO23")
13 gpio.enableIrq(cb)
15 gpio.disableIrq(cb)
16 gpio.clearIrq(cb)
17 gpio.close()
/AliOS-Things-master/components/py_engine/tests/haas/HaaSEdu/python-apps/driver/gpio/
A Dmain.py11 gpio = GPIO() variable
12 gpio.open("GPIO23")
13 gpio.enableIrq(cb)
15 gpio.disableIrq(cb)
16 gpio.clearIrq(cb)
17 gpio.close()
/AliOS-Things-master/components/py_engine/tests/haas/HaaSEdu/python-apps/driver/led/
A Dmain.py7 gpio = GPIO() variable
11 gpio.open(led)
12 gpio.write(1)
14 gpio.write(0)
16 gpio.close()
/AliOS-Things-master/components/drivers/peripheral/gpio/
A DREADME.md1 @page gpio GPIO
3 [更正文档](https://gitee.com/alios-things/gpio/edit/master/README.md) &emsp;&emsp;&emsp;&emsp; [贡献说明](h…
18 │   │ └── gpio.h # HAL API
41 |pathname |固定为`"/dev/gpio"`|
132 - gpio: master # helloworld_demo中引入gpio组件
142 aos install gpio
149 gpio组件的package.yaml中添加example
178 open gpio success, fd:<fd>
179 gpio read <pin ID> return <ioctl IOC_GPIO_GET返回值>
180 gpio write <pin ID> return <ioctl IOC_GPIO_SET(配置输出)返回值>
[all …]
/AliOS-Things-master/components/py_engine/tests/haas/HaaS100/python-apps/linkkit/
A Dmain.py32 gpio = GPIO()
35 gpio.open('led1')
37 gpio.write(ON)
39 gpio.write(OFF)
41 gpio.close()
/AliOS-Things-master/components/py_engine/tests/haas/HaaS200/python-apps/linkkit/
A Dmain.py32 gpio = GPIO()
35 gpio.open('led1')
37 gpio.write(ON)
39 gpio.write(OFF)
41 gpio.close()
/AliOS-Things-master/components/py_engine/tests/haas/HaaSEdu/python-apps/linkkit/
A Dmain.py32 gpio = GPIO()
35 gpio.open('led1')
37 gpio.write(ON)
39 gpio.write(OFF)
41 gpio.close()
/AliOS-Things-master/solutions/javascript_demo/board/haas-edu-k1/
A Doled.js27 import * as gpio from 'gpio'
30 var oled_dc = gpio.open({ id: "oled_dc" });
31 var oled_res = gpio.open({ id: "oled_res" });
/AliOS-Things-master/components/amp/example-js/
A Dgpio.js1 var gpio = require('gpio'); variable
3 var led = gpio.open({
13 var key = gpio.open({
/AliOS-Things-master/solutions/javascript_demo/board/haas600/
A Doled.js27 import * as gpio from 'gpio'
30 var oled_dc = gpio.open({
40 var oled_res = gpio.open({
/AliOS-Things-master/solutions/javascript_demo/board/haas100/
A Doled.js27 import * as gpio from 'gpio'
30 var oled_dc = gpio.open({
40 var oled_res = gpio.open({
/AliOS-Things-master/components/amp/test/
A Dtest_sh1106.js1 var gpio = require('gpio'); variable
8 var oled_dc = gpio.open({
18 var oled_res = gpio.open({
/AliOS-Things-master/hardware/board/haaseduk1/drivers/
A Dkey.c49 static void key_rising_edge_handle(gpio_dev_t *gpio);
50 static void key_falling_edge_handle(gpio_dev_t *gpio);
52 int find_key_index(gpio_dev_t *gpio) in find_key_index() argument
55 gpio_dev_t *key_gpio = gpio; in find_key_index()
132 static void key_rising_edge_handle(gpio_dev_t *gpio) in key_rising_edge_handle() argument
135 gpio_dev_t *key_gpio = gpio; in key_rising_edge_handle()
186 static void key_falling_edge_handle(gpio_dev_t *gpio) in key_falling_edge_handle() argument
189 gpio_dev_t *key_gpio = gpio; in key_falling_edge_handle()

Completed in 28 milliseconds

123