Go to the source code of this file.
Data Structures | |
struct | EQEP_SourceSelect |
Macros | |
#define | EQEP_CONFIG_QUADRATURE (0x0000U) |
Header files. More... | |
#define | EQEP_CONFIG_CLOCK_DIR (0x4000U) |
Up-count mode, QDIR = 1. More... | |
#define | EQEP_CONFIG_UP_COUNT (0x8000U) |
Down-count mode, QDIR = 0. More... | |
#define | EQEP_CONFIG_DOWN_COUNT (0xC000U) |
#define | EQEP_CONFIG_2X_RESOLUTION (0x0000U) |
< Count rising and falling edge More... | |
#define | EQEP_CONFIG_1X_RESOLUTION (0x0800U) |
#define | EQEP_CONFIG_NO_SWAP (0x0000U) |
< Do not swap QEPA and QEPB More... | |
#define | EQEP_CONFIG_SWAP (0x0400U) |
#define | EQEP_COMPARE_NO_SYNC_OUT (0x0000U) |
< Disable sync output More... | |
#define | EQEP_COMPARE_IDX_SYNC_OUT (0x2000U) |
Sync output on strobe pin. More... | |
#define | EQEP_COMPARE_STROBE_SYNC_OUT (0x3000U) |
#define | EQEP_COMPARE_NO_SHADOW (0x0000U) |
< Disable shadow of QPOSCMP More... | |
#define | EQEP_COMPARE_LOAD_ON_ZERO (0x8000U) |
Load on QPOSCNT = QPOSCMP. More... | |
#define | EQEP_COMPARE_LOAD_ON_MATCH (0xC000U) |
#define | EQEP_INT_GLOBAL (0x0001U) |
Global interrupt flag. More... | |
#define | EQEP_INT_POS_CNT_ERROR (0x0002U) |
Position counter error. More... | |
#define | EQEP_INT_PHASE_ERROR (0x0004U) |
Quadrature phase error. More... | |
#define | EQEP_INT_DIR_CHANGE (0x0008U) |
Quadrature direction change. More... | |
#define | EQEP_INT_WATCHDOG (0x0010U) |
Watchdog time-out. More... | |
#define | EQEP_INT_UNDERFLOW (0x0020U) |
Position counter underflow. More... | |
#define | EQEP_INT_OVERFLOW (0x0040U) |
Position counter overflow. More... | |
#define | EQEP_INT_POS_COMP_READY (0x0080U) |
Position-compare ready. More... | |
#define | EQEP_INT_POS_COMP_MATCH (0x0100U) |
Position-compare match. More... | |
#define | EQEP_INT_STROBE_EVNT_LATCH (0x0200U) |
Strobe event latch. More... | |
#define | EQEP_INT_INDEX_EVNT_LATCH (0x0400U) |
Index event latch. More... | |
#define | EQEP_INT_UNIT_TIME_OUT (0x0800U) |
Unit time-out. More... | |
#define | EQEP_INT_QMA_ERROR (0x1000U) |
QMA error. More... | |
#define | EQEP_STS_UNIT_POS_EVNT (0x0080U) |
Unit position event detected. More... | |
#define | EQEP_STS_DIR_ON_1ST_IDX (0x0040U) |
Direction was clockwise on first index event. More... | |
#define | EQEP_STS_DIR_FLAG (0x0020U) |
Direction is CW (forward) More... | |
#define | EQEP_STS_DIR_LATCH (0x0010U) |
Direction was CW on index. More... | |
#define | EQEP_STS_CAP_OVRFLW_ERROR (0x0008U) |
Capture timer overflow. More... | |
#define | EQEP_STS_CAP_DIR_ERROR (0x0004U) |
Direction changed between position capture events. More... | |
#define | EQEP_STS_1ST_IDX_FLAG (0x0002U) |
First index pulse occurred. More... | |
#define | EQEP_STS_POS_CNT_ERROR (0x0001U) |
Position counter error. More... | |
#define | EQEP_LATCH_CNT_READ_BY_CPU (0x0000U) |
On position counter read. More... | |
#define | EQEP_LATCH_UNIT_TIME_OUT (0x0004U) |
On unit time-out event. More... | |
#define | EQEP_LATCH_RISING_STROBE (0x0000U) |
On rising edge of strobe. More... | |
#define | EQEP_LATCH_EDGE_DIR_STROBE (0x0040U) |
On rising edge when clockwise, on falling when counter clockwise. More... | |
#define | EQEP_LATCH_RISING_INDEX (0x0010U) |
On rising edge of index. More... | |
#define | EQEP_LATCH_FALLING_INDEX (0x0020U) |
On falling edge of index. More... | |
#define | EQEP_LATCH_SW_INDEX_MARKER (0x0030U) |
On software index marker. More... | |
#define | EQEP_INIT_DO_NOTHING (0x0000U) |
Action is disabled. More... | |
#define | EQEP_INIT_RISING_STROBE (0x0800U) |
On rising edge of strobe. More... | |
#define | EQEP_INIT_EDGE_DIR_STROBE (0x0C00U) |
On rising edge when clockwise, on falling when counter clockwise. More... | |
#define | EQEP_INIT_RISING_INDEX (0x0200U) |
On rising edge of index. More... | |
#define | EQEP_INIT_FALLING_INDEX (0x0300U) |
On falling edge of index. More... | |
Functions | |
static void | EQEP_enableModule (uint32_t base) |
static void | EQEP_disableModule (uint32_t base) |
static void | EQEP_setDecoderConfig (uint32_t base, uint16_t config) |
static void | EQEP_setPositionCounterConfig (uint32_t base, EQEP_PositionResetMode mode, uint32_t maxPosition) |
static uint32_t | EQEP_getPosition (uint32_t base) |
static void | EQEP_setPosition (uint32_t base, uint32_t position) |
static int16_t | EQEP_getDirection (uint32_t base) |
static void | EQEP_enableInterrupt (uint32_t base, uint16_t intFlags) |
static void | EQEP_disableInterrupt (uint32_t base, uint16_t intFlags) |
static uint16_t | EQEP_getInterruptStatus (uint32_t base) |
static void | EQEP_clearInterruptStatus (uint32_t base, uint16_t intFlags) |
static void | EQEP_forceInterrupt (uint32_t base, uint16_t intFlags) |
static bool | EQEP_getError (uint32_t base) |
static uint16_t | EQEP_getStatus (uint32_t base) |
static void | EQEP_clearStatus (uint32_t base, uint16_t statusFlags) |
static void | EQEP_setCaptureConfig (uint32_t base, EQEP_CAPCLKPrescale capPrescale, EQEP_UPEVNTPrescale evntPrescale) |
static void | EQEP_enableCapture (uint32_t base) |
static void | EQEP_disableCapture (uint32_t base) |
static uint16_t | EQEP_getCapturePeriod (uint32_t base) |
static uint16_t | EQEP_getCaptureTimer (uint32_t base) |
static void | EQEP_enableCompare (uint32_t base) |
static void | EQEP_disableCompare (uint32_t base) |
static void | EQEP_setComparePulseWidth (uint32_t base, uint16_t cycles) |
static void | EQEP_loadUnitTimer (uint32_t base, uint32_t period) |
static void | EQEP_enableUnitTimer (uint32_t base, uint32_t period) |
static void | EQEP_disableUnitTimer (uint32_t base) |
static void | EQEP_enableWatchdog (uint32_t base, uint16_t period) |
static void | EQEP_disableWatchdog (uint32_t base) |
static void | EQEP_setWatchdogTimerValue (uint32_t base, uint16_t value) |
static uint16_t | EQEP_getWatchdogTimerValue (uint32_t base) |
static void | EQEP_setPositionInitMode (uint32_t base, uint16_t initMode) |
static void | EQEP_setSWPositionInit (uint32_t base, bool initialize) |
static void | EQEP_setInitialPosition (uint32_t base, uint32_t position) |
static void | EQEP_setLatchMode (uint32_t base, uint32_t latchMode) |
static uint32_t | EQEP_getIndexPositionLatch (uint32_t base) |
static uint32_t | EQEP_getStrobePositionLatch (uint32_t base) |
static uint32_t | EQEP_getPositionLatch (uint32_t base) |
static uint16_t | EQEP_getCaptureTimerLatch (uint32_t base) |
static uint16_t | EQEP_getCapturePeriodLatch (uint32_t base) |
static void | EQEP_setQMAModuleMode (uint32_t base, EQEP_QMAMode qmaMode) |
static void | EQEP_setStrobeSource (uint32_t base, EQEP_StrobeSource strobeSrc) |
static void | EQEP_enableDirectionChangeDuringIndex (uint32_t base) |
static void | EQEP_disableDirectionChangeDuringIndex (uint32_t base) |
static void | EQEP_selectSource (uint32_t base, EQEP_SourceSelect sourceConfig) |
static void | EQEP_setEmulationMode (uint32_t base, EQEP_EmulationMode emuMode) |
void | EQEP_setCompareConfig (uint32_t base, uint16_t config, uint32_t compareValue, uint16_t cycles) |
void | EQEP_setInputPolarity (uint32_t base, bool invertQEPA, bool invertQEPB, bool invertIndex, bool invertStrobe) |