Here is the list of encoder function APIs
Files | |
| file | encoder.h |
| Contains interface to encoder object. | |
Data Structures | |
| struct | ENC_Handle |
| Defines the ENC controller object. More... | |
Functions | |
| ENC_Handle | ENC_init (void *pMemory, const size_t numBytes) |
| Initializes the ENC controller. More... | |
| void | ENC_setParams (ENC_Handle handle, const USER_Params *pUserParams) |
| Set the controller parameters. More... | |
| static void | ENC_setHallGPIO (ENC_Handle handle, const uint32_t gpioHallU, const uint32_t gpioHallV, const uint32_t gpioHallW, const uint32_t gpioHallUBase, const uint32_t gpioHallVBase, const uint32_t gpioHallWBase) |
| Set the hall pins and address (only needed for calibration mode) More... | |
| static float32_t | ENC_getSpeedElec_Hz (ENC_Handle handle) |
| Runs the ENC controller. More... | |
| static float32_t | ENC_getElecAngle (ENC_Handle handle) |
| Gets the angle from encoder. More... | |
| static float32_t | ENC_getState (ENC_Handle handle) |
| Gets the state of the ENC controller. More... | |
| static void | ENC_resetState (ENC_Handle handle) |
| Reset the ENC controller state. More... | |
| static void | ENC_setState (ENC_Handle handle, const ENC_Status_e encState) |
| Sets up the ENC controller state. More... | |
| static void | ENC_setGPIOHallU (ENC_Handle handle, const uint32_t gpioHallU, const uint32_t gpioHallUBase) |
| Set the ENC controller parameter Hall U (only needed for calibration mode) More... | |
| static void | ENC_setGPIOHallV (ENC_Handle handle, const uint32_t gpioHallV, const uint32_t gpioHallVBase) |
| Set the ENC controller parameter Hall V (only needed for calibration mode) More... | |
| static void | ENC_setGPIOHallW (ENC_Handle handle, const uint32_t gpioHallW, const uint32_t gpioHallWBase) |
| Set the ENC controller parameter Hall W (only needed for calibration mode) More... | |
| static void | ENC_setQEPHandle (ENC_Handle handle, const uint32_t qepBase) |
| Set the ENC controller eqep handle. More... | |
| static uint16_t | ENC_getHallState (ENC_Handle handle) |
| Get the hall state. More... | |
| static void | ENC_run (ENC_Handle handle) |
| Runs the ENC controller. More... | |
| static void | ENC_runHall (ENC_Handle handle) |
| Runs the hall of ENC controller. More... | |
Enumerations | |
| enum | ENC_Status_e { ENC_IDLE = 0, ENC_ALIGNMENT = 1, ENC_WAIT_FOR_INDEX = 2, ENC_CALIBRATION_DONE = 3 } |
Macros | |
| #define | ENC_inline_run ENC_run |
| #define | ENC_full_run ENC_runHall |
| #define ENC_inline_run ENC_run |
| #define ENC_full_run ENC_runHall |
| enum ENC_Status_e |
| ENC_Handle ENC_init | ( | void * | pMemory, |
| const size_t | numBytes | ||
| ) |
Initializes the ENC controller.
| [in] | pMemory | A pointer to the memory for the ENC controller object |
| [in] | numBytes | The number of bytes allocated for the ENC controller object, bytes |
| void ENC_setParams | ( | ENC_Handle | handle, |
| const USER_Params * | pUserParams | ||
| ) |
Set the controller parameters.
| [in] | handle | The ENC controller handle |
| [in] | pUserParams | The pointer to User_Params object |
|
inlinestatic |
Set the hall pins and address (only needed for calibration mode)
| [in] | handle | the ENC Handle |
| [in] | gpioHallU | GPIO pin for Hall U |
| [in] | gpioHallV | GPIO pin for Hall V |
| [in] | gpioHallW | GPIO pin for Hall W |
| [in] | gpioHallUBase | the GPIO base address for Hall U |
| [in] | gpioHallVBase | the GPIO base address for Hall V |
| [in] | gpioHallWBase | the GPIO base address for Hall W |
|
inlinestatic |
Runs the ENC controller.
| [in] | handle | The ENC controller handle |
|
inlinestatic |
Gets the angle from encoder.
| [in] | handle | The ENC controller handle |
|
inlinestatic |
Gets the state of the ENC controller.
| [in] | handle | the ENC Handle |
|
inlinestatic |
Reset the ENC controller state.
| [in] | handle | the ENC Handle |
|
inlinestatic |
Sets up the ENC controller state.
| [in] | handle | the ENC Handle |
| [in] | encState | the enum state of ENC controller |
|
inlinestatic |
Set the ENC controller parameter Hall U (only needed for calibration mode)
| [in] | handle | the ENC Handle |
| [in] | gpioHallU | GPIO pin for Hall U |
| [in] | gpioHallUBase | the GPIO base address for Hall U |
|
inlinestatic |
Set the ENC controller parameter Hall V (only needed for calibration mode)
| [in] | handle | the ENC Handle |
| [in] | gpioHallV | GPIO pin for Hall V |
| [in] | gpioHallVBase | the GPIO base address for Hall V |
|
inlinestatic |
Set the ENC controller parameter Hall W (only needed for calibration mode)
| [in] | handle | the ENC Handle |
| [in] | gpioHallW | GPIO pin for Hall W |
| [in] | gpioHallWBase | the GPIO base address for Hall W |
|
inlinestatic |
Set the ENC controller eqep handle.
| [in] | handle | the ENC Handle |
| [in] | qepBase | the QEP handle |
|
inlinestatic |
Get the hall state.
| [in] | handle | the ENC Handle |
|
static |
Runs the ENC controller.
| [in] | handle | the ENC Handle |
|
static |
Runs the hall of ENC controller.
| [in] | handle | The ENC controller handle |