|
Zephyr Project API 4.3.99
A Scalable Open Source RTOS
|
Interfaces for BL61x GPIO FIFO / Wire Out. More...
Files | |
| file | gpio_bl61x_wo.h |
| Bouffalolab BL61x GPIO FIFO / Wire Out device-specific API extension. | |
Data Structures | |
| struct | bl61x_wo_config |
| Structure holding the configuration for the GPIO FIFO pulse width, polarity, and pins. More... | |
Macros | |
| #define | BL61X_WO_PIN_CNT 16 |
| Maximum number of pin toggled at the same time. | |
Typedefs | |
| typedef void(* | bl61x_wo_callback_t) (void *user_data) |
| Callback type used to inform user async write has completed. | |
Functions | |
| uint16_t | bl61x_wo_frequency_to_cycles (const uint32_t frequency, const bool exact) |
| Convert a frequency to WO clock cycles. | |
| uint16_t | bl61x_wo_time_to_cycles (const uint32_t time, const bool exact) |
| Convert a time to WO clock cycles. | |
| int | bl61x_wo_configure (const struct bl61x_wo_config *const config, const uint8_t *pins, const gpio_flags_t *flags, const size_t pin_cnt) |
| Configure GPIO FIFO. | |
| int | bl61x_wo_configure_dt (const struct bl61x_wo_config *const config, const struct gpio_dt_spec *pins, const size_t pin_cnt) |
| Configure GPIO FIFO using devicetree. | |
| int | bl61x_wo_write (const uint16_t *const data, const size_t len) |
| Write to GPIO FIFO. | |
| int | bl61x_wo_write_async (const uint16_t *const data, const size_t len, bl61x_wo_callback_t cb, void *user_data) |
| Write to GPIO FIFO Asynchronously. | |
Interfaces for BL61x GPIO FIFO / Wire Out.
| #define BL61X_WO_PIN_CNT 16 |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/gpio/gpio_bl61x_wo.h>
Maximum number of pin toggled at the same time.
| typedef void(* bl61x_wo_callback_t) (void *user_data) |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/gpio/gpio_bl61x_wo.h>
Callback type used to inform user async write has completed.
This callback is called from IRQ context. WO write cannot fail, only data is provided.
| user_data | Pointer to user data provided during callback registration |
| int bl61x_wo_configure | ( | const struct bl61x_wo_config *const | config, |
| const uint8_t * | pins, | ||
| const gpio_flags_t * | flags, | ||
| const size_t | pin_cnt ) |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/gpio/gpio_bl61x_wo.h>
Configure GPIO FIFO.
| config | Pointer to the configuration structure |
| pins | Up to 16 pins |
| flags | Flags for the pins, will be ored with GPIO_OUTPUT |
| pin_cnt | Number of pins to configure |
| 0 | On success returns -EINVAL if configuration is invalid, or other error codes. |
| int bl61x_wo_configure_dt | ( | const struct bl61x_wo_config *const | config, |
| const struct gpio_dt_spec * | pins, | ||
| const size_t | pin_cnt ) |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/gpio/gpio_bl61x_wo.h>
Configure GPIO FIFO using devicetree.
| config | Pointer to the configuration structure |
| pins | Up to 16 pins |
| pin_cnt | Number of pins to configure |
| 0 | on success |
| -EINVAL | if configuration is invalid, or other error codes. |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/gpio/gpio_bl61x_wo.h>
Convert a frequency to WO clock cycles.
| frequency | Frequency in Hz |
| exact | Return 0 instead of closest value when an exact match is not possible |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/gpio/gpio_bl61x_wo.h>
Convert a time to WO clock cycles.
| time | time in nanoseconds |
| exact | Return 0 instead of closest value when an exact match is not possible |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/gpio/gpio_bl61x_wo.h>
Write to GPIO FIFO.
| data | Array containing the sequence of toggles |
| len | Length of the array |
| 0 | on success |
| -EIO | or other error codes. |
| int bl61x_wo_write_async | ( | const uint16_t *const | data, |
| const size_t | len, | ||
| bl61x_wo_callback_t | cb, | ||
| void * | user_data ) |
#include </__w/bridle/bridle/workspace/zephyr/include/zephyr/drivers/gpio/gpio_bl61x_wo.h>
Write to GPIO FIFO Asynchronously.
| data | Array containing the sequence of toggles |
| len | Length of the array |
| cb | Function pointer to completion callback. |
| user_data | Userdata passed to callback. |
| 0 | on success |
| -EIO | or other error codes. |