类型定义 | |
| typedef aos_dev_ref_t | aos_gpioc_ref_t |
函数 | |
| aos_status_t | aos_gpioc_get (aos_gpioc_ref_t *ref, uint32_t id) |
| Get a GPIO controller device. 更多... | |
| void | aos_gpioc_put (aos_gpioc_ref_t *ref) |
| Release a GPIO controller device. 更多... | |
| 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 (aos_gpioc_ref_t *ref, uint32_t pin, uint32_t mode) |
| Set 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. 更多... | |
| 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_toggle (aos_gpioc_ref_t *ref, uint32_t pin) |
| Toggle the output level of a GPIO pin. 更多... | |
给应用提供GPIO控制器操作的AOS API.
| typedef aos_dev_ref_t aos_gpioc_ref_t |
| aos_status_t aos_gpioc_get | ( | aos_gpioc_ref_t * | ref, |
| uint32_t | id | ||
| ) |
Get a GPIO controller device.
| [out] | ref | GPIO controller ref to operate |
| [in] | id | GPIO controller device ID |
| 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.
| [in] | ref | GPIO controller ref to operate |
| [in] | pin | pin to operate |
| [out] | mode | pin mode |
| aos_status_t aos_gpioc_get_num_pins | ( | aos_gpioc_ref_t * | ref | ) |
Get number of pins on a GPIO controller device.
| [in] | ref | GPIO controller ref to operate |
| 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.
| [in] | ref | GPIO controller ref to operate |
| [in] | pin | pin to operate |
| void aos_gpioc_put | ( | aos_gpioc_ref_t * | ref | ) |
Release a GPIO controller device.
| [in] | ref | GPIO controller ref to operate |
| 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.
| [in] | ref | GPIO controller ref to operate |
| [in] | pin | pin to operate |
| [in] | mode | pin mode |
| 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.
| [in] | ref | GPIO controller ref to operate |
| [in] | pin | pin to operate |
| [in] | mode | pin mode |
| [in] | irq_handler | IRQ handler |
| [in] | irq_arg | argument passed to IRQ handler |
| 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.
| [in] | ref | GPIO controller ref to operate |
| [in] | pin | pin to operate |
| [in] | val | output level |
| aos_status_t aos_gpioc_toggle | ( | aos_gpioc_ref_t * | ref, |
| uint32_t | pin | ||
| ) |
Toggle the output level of a GPIO pin.
| [in] | ref | GPIO controller ref to operate |
| [in] | pin | pin to operate |