|
Zephyr API Documentation 4.4.0
A Scalable Open Source RTOS
|
TI AM3352 EQEP counter device-specific API extension. More...
Files | |
| file | ti_am3352_eqep.h |
| Public API for TI AM3352 Enhanced Quadrature Encoder Pulse (EQEP) counter. | |
Data Structures | |
| struct | ti_eqep_qep_cfg |
| Configuration for QEP control register. More... | |
| struct | ti_eqep_dec_cfg |
| Configuration for decoder unit register. More... | |
| struct | ti_eqep_cap_cfg |
| Configuration for capture unit register. More... | |
Macros | |
| #define | TI_EQEP_ALARM_CHAN_NUM (4) |
| Number of EQEP alarm channels. | |
Functions | |
| void | ti_eqep_configure_qep (const struct device *dev, const struct ti_eqep_qep_cfg *qep_cfg) |
| Configure QEP Control. | |
| void | ti_eqep_configure_decoder (const struct device *dev, const struct ti_eqep_dec_cfg *dec_cfg) |
| Configure Decoder Unit. | |
| void | ti_eqep_configure_capture (const struct device *dev, const struct ti_eqep_cap_cfg *cap_cfg) |
| Configure Edge Capture Unit. | |
| int | ti_eqep_get_latched_capture_values (const struct device *dev, uint32_t *timer, uint32_t *period, bool scale) |
| Get latched capture timer and period values. | |
TI AM3352 EQEP counter device-specific API extension.
| #define TI_EQEP_ALARM_CHAN_NUM (4) |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Number of EQEP alarm channels.
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
EQEP Event Source Identifiers (Logical Channels).
These represent different interrupt sources within the EQEP peripheral, not independent hardware channels. Each corresponds to a distinct functional unit that can generate events and trigger callbacks through the counter API.
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Capture timer clock prescaler values.
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Capture unit latch mode.
| Enumerator | |
|---|---|
| TI_EQEP_CAPTURE_LATCH_CPU | Latch capture timer and capture period on counter read. |
| TI_EQEP_CAPTURE_LATCH_TIMEOUT | Latch counter, capture timer and capture period on timeout. |
| enum ti_eqep_index_latch |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Index event latch mode.
| enum ti_eqep_reset_mode |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Position counter reset mode.
| enum ti_eqep_src |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Position counter source selection.
| Enumerator | |
|---|---|
| TI_EQEP_SRC_QUADRATURE | Quadrature Count Mode. |
| TI_EQEP_SRC_DIRECTION | Direction Count Mode. |
| TI_EQEP_SRC_UP | Up Count Mode. |
| TI_EQEP_SRC_DOWN | Down Count Mode. |
| enum ti_eqep_strobe_latch |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Strobe event latch mode.
| Enumerator | |
|---|---|
| TI_EQEP_STROBE_LATCH_RISING | Latch counter on strobe's rising edge. |
| TI_EQEP_STROBE_LATCH_DIR | Latch counter on strobe's rising edge if clockwise and falling edge if anti-clockwise. |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Unit position event prescaler values.
| void ti_eqep_configure_capture | ( | const struct device * | dev, |
| const struct ti_eqep_cap_cfg * | cap_cfg ) |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Configure Edge Capture Unit.
| [in] | dev | Pointer to EQEP counter device |
| [in] | cap_cfg | Pointer to edge capture configuration |
| void ti_eqep_configure_decoder | ( | const struct device * | dev, |
| const struct ti_eqep_dec_cfg * | dec_cfg ) |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Configure Decoder Unit.
| [in] | dev | Pointer to EQEP counter device |
| [in] | dec_cfg | Pointer to decoder configuration |
| void ti_eqep_configure_qep | ( | const struct device * | dev, |
| const struct ti_eqep_qep_cfg * | qep_cfg ) |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Configure QEP Control.
| [in] | dev | Pointer to EQEP counter device |
| [in] | qep_cfg | Pointer to QEP control configuration |
| int ti_eqep_get_latched_capture_values | ( | const struct device * | dev, |
| uint32_t * | timer, | ||
| uint32_t * | period, | ||
| bool | scale ) |
#include <zephyr/drivers/counter/ti_am3352_eqep.h>
Get latched capture timer and period values.
| [in] | dev | Pointer to EQEP counter device |
| [out] | timer | Latched capture timer value |
| [out] | period | Latched capture period value |
| [in] | scale | Scale values by capture clock prescaler |
| 0 | if success |
| -EINVAL | if out parameters are NULL |
| -ENOTSUP | if capture unit is not enabled |