gpioc.h
浏览该文件的文档.
1 /*
2  * Copyright (C) 2020-2021 Alibaba Group Holding Limited
3  */
4 
5 #ifndef AOS_GPIOC_H
6 #define AOS_GPIOC_H
7 
8 #include <aos/device.h>
9 #include <aos/gpio.h>
10 
19 typedef aos_dev_ref_t aos_gpioc_ref_t;
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
51 aos_status_t aos_gpioc_get_mode(aos_gpioc_ref_t *ref, uint32_t pin, uint32_t *mode);
59 aos_status_t aos_gpioc_set_mode(aos_gpioc_ref_t *ref, uint32_t pin, uint32_t mode);
69 aos_status_t aos_gpioc_set_mode_irq(aos_gpioc_ref_t *ref, uint32_t pin, uint32_t mode,
70  aos_gpio_irq_handler_t irq_handler, void *irq_arg);
85 aos_status_t aos_gpioc_set_value(aos_gpioc_ref_t *ref, uint32_t pin, int val);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
100 #endif /* AOS_GPIOC_H */
void aos_gpioc_put(aos_gpioc_ref_t *ref)
Release a GPIO controller device.
aos_status_t aos_gpioc_get_value(aos_gpioc_ref_t *ref, uint32_t pin)
Get the input or output level of a GPIO pin.
aos_status_t aos_gpioc_set_value(aos_gpioc_ref_t *ref, uint32_t pin, int val)
Set the output level of a GPIO pin.
aos_status_t aos_gpioc_get(aos_gpioc_ref_t *ref, uint32_t id)
Get a GPIO controller device.
aos_status_t aos_gpioc_set_mode(aos_gpioc_ref_t *ref, uint32_t pin, uint32_t mode)
Set the parameters associated with a GPIO pin.
aos_status_t aos_gpioc_toggle(aos_gpioc_ref_t *ref, uint32_t pin)
Toggle the output level of a GPIO pin.
aos_dev_ref_t aos_gpioc_ref_t
Definition: gpioc.h:19
aos_status_t aos_gpioc_get_num_pins(aos_gpioc_ref_t *ref)
Get number of pins on a GPIO controller device.
aos_status_t aos_gpioc_get_mode(aos_gpioc_ref_t *ref, uint32_t pin, uint32_t *mode)
Get the parameters associated with a GPIO pin.
aos_status_t aos_gpioc_set_mode_irq(aos_gpioc_ref_t *ref, uint32_t pin, uint32_t mode, aos_gpio_irq_handler_t irq_handler, void *irq_arg)
Set the parameters and IRQ settings associated with a GPIO pin.
int32_t aos_status_t
Definition: kernel.h:185