Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
Time-aware GPIO Interface. More...
Enumerations | |
enum | tgpio_pin_polarity { TGPIO_RISING_EDGE = 0 , TGPIO_FALLING_EDGE , TGPIO_TOGGLE_EDGE } |
Event polarity. More... | |
Functions | |
int | tgpio_port_get_time (const struct device *dev, uint64_t *current_time) |
Get time from ART timer. | |
int | tgpio_port_get_cycles_per_second (const struct device *dev, uint32_t *cycles) |
Get current running rate. | |
int | tgpio_pin_disable (const struct device *dev, uint32_t pin) |
Disable operation on pin. | |
int | tgpio_pin_config_ext_timestamp (const struct device *dev, uint32_t pin, uint32_t event_polarity) |
Enable/Continue operation on pin. | |
int | tgpio_pin_periodic_output (const struct device *dev, uint32_t pin, uint64_t start_time, uint64_t repeat_interval, bool periodic_enable) |
Enable periodic pulse generation on a pin. | |
int | tgpio_pin_read_ts_ec (const struct device *dev, uint32_t pin, uint64_t *timestamp, uint64_t *event_count) |
Read timestamp and event counter from TGPIO. | |
Time-aware GPIO Interface.
enum tgpio_pin_polarity |
#include <include/zephyr/drivers/misc/timeaware_gpio/timeaware_gpio.h>
Event polarity.
Enumerator | |
---|---|
TGPIO_RISING_EDGE | |
TGPIO_FALLING_EDGE | |
TGPIO_TOGGLE_EDGE |
int tgpio_pin_config_ext_timestamp | ( | const struct device * | dev, |
uint32_t | pin, | ||
uint32_t | event_polarity | ||
) |
#include <include/zephyr/drivers/misc/timeaware_gpio/timeaware_gpio.h>
Enable/Continue operation on pin.
dev | TGPIO device |
pin | TGPIO pin |
event_polarity | TGPIO pin event polarity |
#include <include/zephyr/drivers/misc/timeaware_gpio/timeaware_gpio.h>
Disable operation on pin.
dev | TGPIO device |
pin | TGPIO pin |
int tgpio_pin_periodic_output | ( | const struct device * | dev, |
uint32_t | pin, | ||
uint64_t | start_time, | ||
uint64_t | repeat_interval, | ||
bool | periodic_enable | ||
) |
#include <include/zephyr/drivers/misc/timeaware_gpio/timeaware_gpio.h>
Enable periodic pulse generation on a pin.
dev | TGPIO device |
pin | TGPIO pin |
start_time | start_time of first pulse in hw cycles |
repeat_interval | repeat interval between two pulses in hw cycles |
periodic_enable | enables periodic mode if 'true' is passed. |
int tgpio_pin_read_ts_ec | ( | const struct device * | dev, |
uint32_t | pin, | ||
uint64_t * | timestamp, | ||
uint64_t * | event_count | ||
) |
#include <include/zephyr/drivers/misc/timeaware_gpio/timeaware_gpio.h>
Read timestamp and event counter from TGPIO.
dev | TGPIO device |
pin | TGPIO pin |
timestamp | timestamp of the last pulse received |
event_count | number of pulses received since the pin is enabled |
#include <include/zephyr/drivers/misc/timeaware_gpio/timeaware_gpio.h>
Get current running rate.
dev | TGPIO device |
cycles | pointer to store current running frequency |
#include <include/zephyr/drivers/misc/timeaware_gpio/timeaware_gpio.h>
Get time from ART timer.
dev | TGPIO device |
current_time | Pointer to store timer value in cycles |