|
MotorWare f2806x Driver API Documentation
|
Data Structures | |
| struct | _QEP_Obj_ |
| Defines the QEP object. More... | |
Macros | |
| #define | QEP1_BASE_ADDR (0x00006B00) |
| #define | QEP2_BASE_ADDR (0x00006B40) |
| #define | QEP_QDECCTL_QSRC (3 << 14) |
| position counter source selection More... | |
| #define | QEP_QDECCTL_SOEN (1 << 13) |
| sync output enable More... | |
| #define | QEP_QDECCTL_SPSEL (1 << 12) |
| sync output pin selection More... | |
| #define | QEP_QDECCTL_XCR (1 << 11) |
| external clock rate More... | |
| #define | QEP_QDECCTL_SWAP (1 << 10) |
| swap quadrature clock inputs More... | |
| #define | QEP_QDECCTL_IGATE (1 << 9) |
| index pulse gating option More... | |
| #define | QEP_QDECCTL_QAP (1 << 8) |
| QEPA input polarity. More... | |
| #define | QEP_QDECCTL_QBP (1 << 7) |
| QEPB input polarity. More... | |
| #define | QEP_QDECCTL_QIP (1 << 6) |
| QEPI input polarity. More... | |
| #define | QEP_QDECCTL_QSP (1 << 5) |
| QEPS input polarity. More... | |
| #define | QEP_QEPCTL_FREESOFT ( 3 << 14) |
| emulation control bit More... | |
| #define | QEP_QEPCTL_PCRM ( 3 << 12) |
| emulation control bit More... | |
| #define | QEP_QEPCTL_SEI ( 3 << 10) |
| strobe event initialization of position counter More... | |
| #define | QEP_QEPCTL_IEI ( 3 << 8) |
| index event initialization of position counter More... | |
| #define | QEP_QEPCTL_SWI ( 1 << 7) |
| software initialization of position counter More... | |
| #define | QEP_QEPCTL_SEL ( 1 << 6) |
| strobe event latch of position counter More... | |
| #define | QEP_QEPCTL_IEL ( 3 << 4) |
| index event latch of position counter (software index marker) More... | |
| #define | QEP_QEPCTL_QPEN ( 1 << 3) |
| quad position counter enable/software reset More... | |
| #define | QEP_QEPCTL_QCLM ( 1 << 2) |
| QEP capture latch mode. More... | |
| #define | QEP_QEPCTL_UTE ( 1 << 1) |
| QEP unit timer enable. More... | |
| #define | QEP_QEPCTL_WDE ( 1 << 0) |
| watchdog timer enable More... | |
| #define | QEP_QPOSCTL_PCSHDW ( 1 << 15) |
| position compare shadow enable More... | |
| #define | QEP_QPOSCTL_PCLOAD ( 1 << 14) |
| position compare shadow load mode More... | |
| #define | QEP_QPOSCTL_PCPOL ( 1 << 13) |
| load when QPOSCNT = QPOSCMP More... | |
| #define | QEP_QPOSCTL_PCE ( 1 << 12) |
| position compare enable/disable More... | |
| #define | QEP_QPOSCTL_PCSPW (4095 << 0) |
| selection position compare sync output pulse width More... | |
| #define | QEP_QCAPCTL_CEN ( 1 << 15) |
| enable QEP capture More... | |
| #define | QEP_QCAPCTL_CCPS ( 7 << 4) |
| qep capture timer clock prescaler More... | |
| #define | QEP_QCAPCTL_UPPS ( 15 << 0) |
| unit position event prescaler More... | |
| #define | QEP_QEINT_UTO ( 1 << 11) |
| unit timeout interrupt enable More... | |
| #define | QEP_QEINT_IEL ( 1 << 10) |
| index event latch interrupt enable More... | |
| #define | QEP_QEINT_SEL ( 1 << 9) |
| strobe event latch interrupt enable More... | |
| #define | QEP_QEINT_PCM ( 1 << 8) |
| position compare match interrupt enable More... | |
| #define | QEP_QEINT_PCR ( 1 << 7) |
| position compare ready interrupt enable More... | |
| #define | QEP_QEINT_PCO ( 1 << 6) |
| position counter overflow interrupt enable More... | |
| #define | QEP_QEINT_PCU ( 1 << 5) |
| position counter underflow interrupt enable More... | |
| #define | QEP_QEINT_WTO ( 1 << 4) |
| watchdog time out interrupt enable More... | |
| #define | QEP_QEINT_QDC ( 1 << 3) |
| quadrature direction change interrupt enable More... | |
| #define | QEP_QEINT_QPE ( 1 << 2) |
| quadrature phase error interrupt enable More... | |
| #define | QEP_QEINT_PCE ( 1 << 1) |
| position counter error interrupt enable More... | |
| #define | QEP_QFLG_UTO ( 1 << 11) |
| unit timeout interrupt flag More... | |
| #define | QEP_QFLG_IEL ( 1 << 10) |
| index event latch interrupt flag More... | |
| #define | QEP_QFLG_SEL ( 1 << 9) |
| strobe event latch interrupt flag More... | |
| #define | QEP_QFLG_PCM ( 1 << 8) |
| position compare match interrupt flag More... | |
| #define | QEP_QFLG_PCR ( 1 << 7) |
| position compare ready interrupt flag More... | |
| #define | QEP_QFLG_PCO ( 1 << 6) |
| position counter overflow interrupt flag More... | |
| #define | QEP_QFLG_PCU ( 1 << 5) |
| position counter underflow interrupt flag More... | |
| #define | QEP_QFLG_WTO ( 1 << 4) |
| watchdog time out interrupt flag More... | |
| #define | QEP_QFLG_QDC ( 1 << 3) |
| quadrature direction change interrupt flag More... | |
| #define | QEP_QFLG_QPE ( 1 << 2) |
| quadrature phase error interrupt flag More... | |
| #define | QEP_QFLG_PCE ( 1 << 1) |
| position counter error interrupt flag More... | |
| #define | QEP_QCLR_UTO ( 1 << 11) |
| clear unit timeout interrupt flag More... | |
| #define | QEP_QCLR_IEL ( 1 << 10) |
| clear index event latch interrupt flag More... | |
| #define | QEP_QCLR_SEL ( 1 << 9) |
| clear strobe event latch interrupt flag More... | |
| #define | QEP_QCLR_PCM ( 1 << 8) |
| clear position compare match interrupt flag More... | |
| #define | QEP_QCLR_PCR ( 1 << 7) |
| clear position compare ready interrupt flag More... | |
| #define | QEP_QCLR_PCO ( 1 << 6) |
| clear position counter overflow interrupt flag More... | |
| #define | QEP_QCLR_PCU ( 1 << 5) |
| clear position counter underflow interrupt flag More... | |
| #define | QEP_QCLR_WTO ( 1 << 4) |
| clear watchdog time out interrupt flag More... | |
| #define | QEP_QCLR_QDC ( 1 << 3) |
| clear quadrature direction change interrupt flag More... | |
| #define | QEP_QCLR_QPE ( 1 << 2) |
| clear quadrature phase error interrupt flag More... | |
| #define | QEP_QCLR_PCE ( 1 << 1) |
| clear position counter error interrupt flag More... | |
| #define | QEP_QFRC_UTO ( 1 << 11) |
| force unit timeout interrupt More... | |
| #define | QEP_QFRC_IEL ( 1 << 10) |
| force index event latch interrupt More... | |
| #define | QEP_QFRC_SEL ( 1 << 9) |
| force strobe event latch interrupt More... | |
| #define | QEP_QFRC_PCM ( 1 << 8) |
| force position compare match interrupt More... | |
| #define | QEP_QFRC_PCR ( 1 << 7) |
| force position compare ready interrupt More... | |
| #define | QEP_QFRC_PCO ( 1 << 6) |
| force position counter overflow interrupt More... | |
| #define | QEP_QFRC_PCU ( 1 << 5) |
| force position counter underflow interrupt More... | |
| #define | QEP_QFRC_WTO ( 1 << 4) |
| force watchdog time out interrupt More... | |
| #define | QEP_QFRC_QDC ( 1 << 3) |
| force quadrature direction change interrupt More... | |
| #define | QEP_QFRC_QPE ( 1 << 2) |
| force quadrature phase error interrupt More... | |
| #define | QEP_QFRC_PCE ( 1 << 1) |
| force position counter error interrupt More... | |
| #define | QEP_QEPSTS_UPEVNT ( 1 << 7) |
| unit position event flag More... | |
| #define | QEP_QEPSTS_FDF ( 1 << 6) |
| direction on the first index marker More... | |
| #define | QEP_QEPSTS_QDF ( 1 << 5) |
| quadrature direction flag More... | |
| #define | QEP_QEPSTS_QDLF ( 1 << 4) |
| direction latch flag More... | |
| #define | QEP_QEPSTS_COEF ( 1 << 3) |
| capture overflow error flag More... | |
| #define | QEP_QEPSTS_CDEF ( 1 << 2) |
| capture direction error flag More... | |
| #define | QEP_QEPSTS_FIMF ( 1 << 1) |
| first index marker flag More... | |
| #define | QEP_QEPSTS_PCEF ( 1 << 0) |
| position counter error flag More... | |
Typedefs | |
| typedef struct _QEP_Obj_ | QEP_Obj |
| Defines the QEP object. More... | |
| typedef struct _QEP_Obj_ * | QEP_Handle |
| Defines the QEP handle. More... | |
Functions | |
| void | QEP_clear_all_interrupt_flags (QEP_Handle qepHandle) |
| Clears all QEP interrupt flags. More... | |
| void | QEP_clear_interrupt_flag (QEP_Handle qepHandle, const QEINT_e QEINT) |
| Clears a single interrupt flag. More... | |
| void | QEP_clear_posn_counter (QEP_Handle qepHandle) |
| Clears the position counter. More... | |
| void | QEP_disable_all_interrupts (QEP_Handle qepHandle) |
| Disables all interrupts. More... | |
| void | QEP_disable_capture (QEP_Handle qepHandle) |
| Disable capture. More... | |
| void | QEP_disable_gate_index (QEP_Handle qepHandle) |
| Disable gating of index pulse. More... | |
| void | QEP_disable_interrupt (QEP_Handle qepHandle, const QEINT_e QEINT) |
| Disable individual interrupt. More... | |
| void | QEP_disable_posn_compare (QEP_Handle qepHandle) |
| Disable position compare. More... | |
| void | QEP_disable_posn_compare_shadow (QEP_Handle qepHandle) |
| Disable position compare shadowing. More... | |
| void | QEP_disable_sync_out (QEP_Handle qepHandle) |
| Disable output sync pulse. More... | |
| void | QEP_disable_unit_timer (QEP_Handle qepHandle) |
| Disable unit timer. More... | |
| void | QEP_disable_watchdog (QEP_Handle qepHandle) |
| Disable watchdog timer. More... | |
| void | QEP_enable_capture (QEP_Handle qepHandle) |
| Enable capture. More... | |
| void | QEP_enable_counter (QEP_Handle qepHandle) |
| Enable counter. More... | |
| void | QEP_enable_gate_index (QEP_Handle qepHandle) |
| Enable gating of index pulse. More... | |
| void | QEP_enable_interrupt (QEP_Handle qepHandle, const QEINT_e QEINT) |
| Enable individual interrupt. More... | |
| void | QEP_enable_posn_compare (QEP_Handle qepHandle) |
| Enable position compare. More... | |
| void | QEP_enable_posn_compare_shadow (QEP_Handle qepHandle) |
| Enable position compare shadowing. More... | |
| void | QEP_enable_sync_out (QEP_Handle qepHandle) |
| Enable output sync pulse. More... | |
| void | QEP_enable_unit_timer (QEP_Handle qepHandle) |
| Enable unit timer. More... | |
| void | QEP_enable_watchdog (QEP_Handle qepHandle) |
| Enable watchdog timer. More... | |
| void | QEP_force_interrupt (QEP_Handle qepHandle, const QEINT_e QEINT) |
| Manually force QEP interrupt. More... | |
| QEP_Handle | QEP_init (void *pMemory, const size_t numBytes) |
| Initializes the QEP object. More... | |
| uint16_t | QEP_read_capture_period_latch (QEP_Handle qepHandle) |
| Reads capture period latch. More... | |
| uint16_t | QEP_read_capture_timer_latch (QEP_Handle qepHandle) |
| Reads timer latch. More... | |
| uint16_t | QEP_read_interrupt_flag (QEP_Handle qepHandle, const QEINT_e QEINT) |
| Reads interrupt flag value. More... | |
| uint32_t | QEP_read_posn_compare (QEP_Handle qepHandle) |
| Reads position compare register. More... | |
| uint32_t | QEP_read_posn_count (QEP_Handle qepHandle) |
| Reads position counter. More... | |
| uint32_t | QEP_read_posn_index_latch (QEP_Handle qepHandle) |
| Reads position counter value index pulse latch register. More... | |
| uint32_t | QEP_read_posn_latch (QEP_Handle qepHandle) |
| Reads position counter value. More... | |
| uint32_t | QEP_read_posn_strobe_latch (QEP_Handle qepHandle) |
| Reads position strobe latch. More... | |
| uint16_t | QEP_read_status (QEP_Handle qepHandle) |
| Reads status register. More... | |
| void | QEP_reset_counter (QEP_Handle qepHandle) |
| Resets counter. More... | |
| void | QEP_reset_status (QEP_Handle qepHandle, const QEP_qepsts_e qepsts) |
| Resets the individual QEP status register bits. More... | |
| void | QEP_set_capture_latch_mode (QEP_Handle qepHandle, const QEPCTL_Qclm_e QEPCTL_Qclm) |
| Sets capture latch mode. More... | |
| void | QEP_set_capture_period (QEP_Handle qepHandle, const uint16_t period) |
| Sets capture period. More... | |
| void | QEP_set_capture_prescale (QEP_Handle qepHandle, const QCAPCTL_Ccps_e QCAPCTL_Ccps) |
| Sets capture pre-scaler. More... | |
| void | QEP_set_emu_control (QEP_Handle qepHandle, const QEPCTL_Freesoft_e QEPCTL_Freesoft) |
| Sets emulation control. More... | |
| void | QEP_set_ext_clock_rate (QEP_Handle qepHandle, const QEP_Xcr_e QEP_Xcr) |
| Sets external clock rate. More... | |
| void | QEP_set_index_event_init (QEP_Handle qepHandle, const QEPCTL_Iei_e QEPCTL_Iei) |
| Sets the event which initializes the counter register. More... | |
| void | QEP_set_index_event_latch (QEP_Handle qepHandle, const QEPCTL_Iel_e QEPCTL_Iel) |
| Sets the index event which latches the position counter. More... | |
| void | QEP_set_index_polarity (QEP_Handle qepHandle, const QEP_Qip_e QEP_Qip) |
| Sets index polarity. More... | |
| void | QEP_set_max_posn_count (QEP_Handle qepHandle, const uint32_t max_count) |
| Sets max position count. More... | |
| void | QEP_set_posn_compare_pulse_width (QEP_Handle qepHandle, const uint16_t pulse_width) |
| Sets output pulse width when a match occur. More... | |
| void | QEP_set_posn_compare_shadow_load (QEP_Handle qepHandle, const QPOSCTL_Pcload_e QPOSCTL_Pcload) |
| Sets position compare shadow load mode. More... | |
| void | QEP_set_posn_count_reset_mode (QEP_Handle qepHandle, const QEPCTL_Pcrm_e QEPCTL_Pcrm) |
| Sets position counter reset mode. More... | |
| void | QEP_set_posn_init_count (QEP_Handle qepHandle, const uint32_t init_count) |
| Sets initial position counter value. More... | |
| void | QEP_set_select_sync_pin (QEP_Handle qepHandle, const QEP_Spsel_e QEP_SPsel) |
| Selects whether index or strobe pin is used for sync output. More... | |
| void | QEP_set_soft_init (QEP_Handle qepHandle, const QEPCTL_Swi_e QEPCTL_Swi) |
| Determines if software initialization of position counter enabled. More... | |
| void | QEP_set_strobe_event_init (QEP_Handle qepHandle, const QEPCTL_Sei_e QEPCTL_Sei) |
| Determines strobe initialization of position counter. More... | |
| void | QEP_set_strobe_event_latch (QEP_Handle qepHandle, const QEPCTL_Sel_e QEPCTL_Sel) |
| Sets up strobe latch of position counter. More... | |
| void | QEP_set_strobe_polarity (QEP_Handle qepHandle, const QEP_Qsp_e QEP_Qsp) |
| Sets up strobe polarity. More... | |
| void | QEP_set_swap_quad_inputs (QEP_Handle qepHandle, QEP_Swap_e QEP_Swap) |
| Sets up swapping of A/B channels. More... | |
| void | QEP_set_synch_output_compare_polarity (QEP_Handle qepHandle, const QPOSCTL_Pcpol_e QPOSCTL_Pcpol) |
| Sets synch output compare polarity. More... | |
| void | QEP_set_unit_period (QEP_Handle qepHandle, const uint32_t unit_period) |
| Sets unit timer period. More... | |
| void | QEP_set_unit_posn_prescale (QEP_Handle qepHandle, const QCAPCTL_Upps_e QCAPCTL_Upps) |
| Sets unit timer prescaling. More... | |
| void | QEP_set_watchdog_period (QEP_Handle qepHandle, const uint16_t watchdog_period) |
| Sets watchdog period. More... | |
| void | QEP_set_A_polarity (QEP_Handle qepHandle, const QEP_Qap_e QEP_Qap) |
| Sets A polarity. More... | |
| void | QEP_set_B_polarity (QEP_Handle qepHandle, const QEP_Qbp_e QEP_Qbp) |
| Sets B polarity. More... | |
| void | QEP_set_QEP_source (QEP_Handle qepHandle, const QEP_Qsrc_e QEP_Qsrc) |
| QEP counting mode. More... | |
| void | QEP_setup_strobe_event_latch (QEP_Handle qepHandle, const QEPCTL_Sel_e QEPCTL_Sel) |
| QEP strobe latch event. More... | |
| void | QEP_write_posn_compare (QEP_Handle qepHandle, const uint32_t posn) |
| Writes a value to the position compare register. More... | |
| struct _QEP_Obj_ |
| #define QEP_QCAPCTL_CCPS ( 7 << 4) |
qep capture timer clock prescaler
Definition at line 107 of file qep.h.
Referenced by QEP_set_capture_prescale().
| #define QEP_QCAPCTL_CEN ( 1 << 15) |
enable QEP capture
Definition at line 106 of file qep.h.
Referenced by QEP_disable_capture(), and QEP_enable_capture().
| #define QEP_QCAPCTL_UPPS ( 15 << 0) |
unit position event prescaler
Definition at line 108 of file qep.h.
Referenced by QEP_set_unit_posn_prescale().
| #define QEP_QCLR_IEL ( 1 << 10) |
| #define QEP_QCLR_PCE ( 1 << 1) |
| #define QEP_QCLR_PCM ( 1 << 8) |
| #define QEP_QCLR_PCO ( 1 << 6) |
| #define QEP_QCLR_PCR ( 1 << 7) |
| #define QEP_QCLR_PCU ( 1 << 5) |
| #define QEP_QCLR_QDC ( 1 << 3) |
| #define QEP_QCLR_QPE ( 1 << 2) |
| #define QEP_QCLR_SEL ( 1 << 9) |
| #define QEP_QCLR_UTO ( 1 << 11) |
| #define QEP_QCLR_WTO ( 1 << 4) |
| #define QEP_QDECCTL_IGATE (1 << 9) |
index pulse gating option
Definition at line 79 of file qep.h.
Referenced by QEP_disable_gate_index().
| #define QEP_QDECCTL_QAP (1 << 8) |
| #define QEP_QDECCTL_QBP (1 << 7) |
| #define QEP_QDECCTL_QIP (1 << 6) |
| #define QEP_QDECCTL_QSP (1 << 5) |
| #define QEP_QDECCTL_QSRC (3 << 14) |
position counter source selection
Definition at line 74 of file qep.h.
Referenced by QEP_set_QEP_source().
| #define QEP_QDECCTL_SOEN (1 << 13) |
sync output enable
Definition at line 75 of file qep.h.
Referenced by QEP_disable_sync_out(), and QEP_enable_sync_out().
| #define QEP_QDECCTL_SPSEL (1 << 12) |
sync output pin selection
Definition at line 76 of file qep.h.
Referenced by QEP_set_select_sync_pin().
| #define QEP_QDECCTL_SWAP (1 << 10) |
swap quadrature clock inputs
Definition at line 78 of file qep.h.
Referenced by QEP_set_swap_quad_inputs().
| #define QEP_QDECCTL_XCR (1 << 11) |
| #define QEP_QEINT_IEL ( 1 << 10) |
| #define QEP_QEINT_PCE ( 1 << 1) |
| #define QEP_QEINT_PCM ( 1 << 8) |
| #define QEP_QEINT_PCO ( 1 << 6) |
| #define QEP_QEINT_PCR ( 1 << 7) |
| #define QEP_QEINT_PCU ( 1 << 5) |
| #define QEP_QEINT_QDC ( 1 << 3) |
| #define QEP_QEINT_QPE ( 1 << 2) |
| #define QEP_QEINT_SEL ( 1 << 9) |
| #define QEP_QEINT_UTO ( 1 << 11) |
| #define QEP_QEINT_WTO ( 1 << 4) |
| #define QEP_QEPCTL_FREESOFT ( 3 << 14) |
| #define QEP_QEPCTL_IEI ( 3 << 8) |
index event initialization of position counter
Definition at line 89 of file qep.h.
Referenced by QEP_set_index_event_init().
| #define QEP_QEPCTL_IEL ( 3 << 4) |
index event latch of position counter (software index marker)
Definition at line 92 of file qep.h.
Referenced by QEP_set_index_event_latch().
| #define QEP_QEPCTL_PCRM ( 3 << 12) |
emulation control bit
Definition at line 87 of file qep.h.
Referenced by QEP_set_posn_count_reset_mode().
| #define QEP_QEPCTL_QCLM ( 1 << 2) |
QEP capture latch mode.
Definition at line 94 of file qep.h.
Referenced by QEP_set_capture_latch_mode().
| #define QEP_QEPCTL_QPEN ( 1 << 3) |
quad position counter enable/software reset
Definition at line 93 of file qep.h.
Referenced by QEP_enable_counter(), and QEP_reset_counter().
| #define QEP_QEPCTL_SEI ( 3 << 10) |
strobe event initialization of position counter
Definition at line 88 of file qep.h.
Referenced by QEP_set_strobe_event_init().
| #define QEP_QEPCTL_SEL ( 1 << 6) |
strobe event latch of position counter
Definition at line 91 of file qep.h.
Referenced by QEP_set_strobe_event_latch(), and QEP_setup_strobe_event_latch().
| #define QEP_QEPCTL_SWI ( 1 << 7) |
software initialization of position counter
Definition at line 90 of file qep.h.
Referenced by QEP_set_soft_init().
| #define QEP_QEPCTL_UTE ( 1 << 1) |
QEP unit timer enable.
Definition at line 95 of file qep.h.
Referenced by QEP_disable_unit_timer(), and QEP_enable_unit_timer().
| #define QEP_QEPCTL_WDE ( 1 << 0) |
watchdog timer enable
Definition at line 96 of file qep.h.
Referenced by QEP_disable_watchdog(), and QEP_enable_watchdog().
| #define QEP_QEPSTS_CDEF ( 1 << 2) |
| #define QEP_QEPSTS_FDF ( 1 << 6) |
| #define QEP_QFLG_IEL ( 1 << 10) |
| #define QEP_QFLG_PCE ( 1 << 1) |
| #define QEP_QFLG_PCM ( 1 << 8) |
| #define QEP_QFLG_PCO ( 1 << 6) |
| #define QEP_QFLG_PCR ( 1 << 7) |
| #define QEP_QFLG_PCU ( 1 << 5) |
| #define QEP_QFLG_QDC ( 1 << 3) |
| #define QEP_QFLG_QPE ( 1 << 2) |
| #define QEP_QFLG_SEL ( 1 << 9) |
| #define QEP_QFLG_WTO ( 1 << 4) |
| #define QEP_QFRC_IEL ( 1 << 10) |
| #define QEP_QFRC_PCE ( 1 << 1) |
| #define QEP_QFRC_PCM ( 1 << 8) |
| #define QEP_QFRC_PCO ( 1 << 6) |
| #define QEP_QFRC_PCR ( 1 << 7) |
| #define QEP_QFRC_PCU ( 1 << 5) |
| #define QEP_QFRC_QDC ( 1 << 3) |
| #define QEP_QFRC_QPE ( 1 << 2) |
| #define QEP_QFRC_SEL ( 1 << 9) |
| #define QEP_QFRC_WTO ( 1 << 4) |
| #define QEP_QPOSCTL_PCE ( 1 << 12) |
position compare enable/disable
Definition at line 102 of file qep.h.
Referenced by QEP_disable_posn_compare(), and QEP_enable_posn_compare().
| #define QEP_QPOSCTL_PCLOAD ( 1 << 14) |
position compare shadow load mode
Definition at line 100 of file qep.h.
Referenced by QEP_set_posn_compare_shadow_load().
| #define QEP_QPOSCTL_PCPOL ( 1 << 13) |
load when QPOSCNT = QPOSCMP
Definition at line 101 of file qep.h.
Referenced by QEP_set_synch_output_compare_polarity().
| #define QEP_QPOSCTL_PCSHDW ( 1 << 15) |
position compare shadow enable
Definition at line 99 of file qep.h.
Referenced by QEP_disable_posn_compare_shadow(), and QEP_enable_posn_compare_shadow().
| #define QEP_QPOSCTL_PCSPW (4095 << 0) |
selection position compare sync output pulse width
Definition at line 103 of file qep.h.
Referenced by QEP_set_posn_compare_pulse_width().
| typedef struct _QEP_Obj_* QEP_Handle |
| enum QCAPCTL_Ccps_e |
QEP capture timer clock prescaler.
| enum QCAPCTL_Upps_e |
Unit position event prescaler.
| enum QEINT_e |
QEP interrupt enable flags.
| enum QEP_Igate_e |
| enum QEP_Qap_e |
| enum QEP_Qbp_e |
| enum QEP_qepsts_e |
| enum QEP_Qip_e |
| enum QEP_Qsp_e |
| enum QEP_Qsrc_e |
| enum QEP_Spsel_e |
| enum QEP_Swap_e |
| enum QEP_Xcr_e |
| enum QEPCTL_Freesoft_e |
Emulation control bits.
| enum QEPCTL_Iei_e |
| enum QEPCTL_Iel_e |
| enum QEPCTL_Pcrm_e |
Position counter reset mode.
| enum QEPCTL_Qclm_e |
| enum QEPCTL_Sei_e |
| enum QEPCTL_Sel_e |
| enum QEPCTL_Swi_e |
| enum QPOSCTL_Pcload_e |
| enum QPOSCTL_Pcpol_e |
| enum QPOSCTL_Pcshdw_e |
|
inline |
Clears all QEP interrupt flags.
| [in] | qepHandle | andle to QEP object |
Definition at line 450 of file qep.h.
References _QEP_Obj_::QCLR.
|
inline |
Clears a single interrupt flag.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEINT | Interrupt flag |
Definition at line 462 of file qep.h.
References _QEP_Obj_::QCLR, and _QEP_Obj_::QEINT.
|
inline |
Clears the position counter.
| [in] | qepHandle | Handle to QEP object |
Definition at line 473 of file qep.h.
References _QEP_Obj_::QPOSCNT.
|
inline |
Disables all interrupts.
| [in] | qepHandle | Handle to QEP object |
Definition at line 484 of file qep.h.
References _QEP_Obj_::QEINT.
|
inline |
Disable capture.
| [in] | qepHandle | Handle to QEP object |
Definition at line 495 of file qep.h.
References _QEP_Obj_::QCAPCTL, and QEP_QCAPCTL_CEN.
|
inline |
Disable gating of index pulse.
| [in] | qepHandle | Handle to QEP object |
Definition at line 506 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_IGATE.
|
inline |
Disable individual interrupt.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEINT | Individual interrupts |
Definition at line 518 of file qep.h.
References _QEP_Obj_::QEINT.
|
inline |
Disable position compare.
| [in] | qepHandle | Handle to QEP object |
Definition at line 529 of file qep.h.
References QEP_QPOSCTL_PCE, and _QEP_Obj_::QPOSCTL.
|
inline |
Disable position compare shadowing.
| [in] | qepHandle | Handle to QEP object |
Definition at line 540 of file qep.h.
References QEP_QPOSCTL_PCSHDW, and _QEP_Obj_::QPOSCTL.
|
inline |
Disable output sync pulse.
| [in] | qepHandle | Handle to QEP object |
Definition at line 551 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_SOEN.
|
inline |
Disable unit timer.
| [in] | qepHandle | Handle to QEP object |
Definition at line 562 of file qep.h.
References QEP_QEPCTL_UTE, and _QEP_Obj_::QEPCTL.
|
inline |
Disable watchdog timer.
| [in] | qepHandle | Handle to QEP object |
Definition at line 573 of file qep.h.
References QEP_QEPCTL_WDE, and _QEP_Obj_::QEPCTL.
|
inline |
Enable capture.
| [in] | qepHandle | Handle to QEP object |
Definition at line 584 of file qep.h.
References _QEP_Obj_::QCAPCTL, and QEP_QCAPCTL_CEN.
|
inline |
Enable counter.
| [in] | qepHandle | Handle to QEP object |
Definition at line 595 of file qep.h.
References QEP_QEPCTL_QPEN, and _QEP_Obj_::QEPCTL.
|
inline |
Enable gating of index pulse.
| [in] | qepHandle | Handle to QEP object |
Definition at line 606 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_Igate_Enable.
|
inline |
Enable individual interrupt.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEINT | Individual interrupts |
Definition at line 618 of file qep.h.
References _QEP_Obj_::QEINT.
|
inline |
Enable position compare.
| [in] | qepHandle | Handle to QEP object |
Definition at line 629 of file qep.h.
References QEP_QPOSCTL_PCE, and _QEP_Obj_::QPOSCTL.
|
inline |
Enable position compare shadowing.
| [in] | qepHandle | Handle to QEP object |
Definition at line 640 of file qep.h.
References QEP_QPOSCTL_PCSHDW, and _QEP_Obj_::QPOSCTL.
|
inline |
Enable output sync pulse.
| [in] | qepHandle | Handle to QEP object |
Definition at line 651 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_SOEN.
|
inline |
Enable unit timer.
| [in] | qepHandle | Handle to QEP object |
Definition at line 662 of file qep.h.
References QEP_QEPCTL_UTE, and _QEP_Obj_::QEPCTL.
|
inline |
Enable watchdog timer.
| [in] | qepHandle | Handle to QEP object |
Definition at line 673 of file qep.h.
References QEP_QEPCTL_WDE, and _QEP_Obj_::QEPCTL.
|
inline |
Manually force QEP interrupt.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEINT | Individual interrupt |
Definition at line 685 of file qep.h.
References _QEP_Obj_::QEINT, and _QEP_Obj_::QFRC.
| QEP_Handle QEP_init | ( | void * | pMemory, |
| const size_t | numBytes | ||
| ) |
|
inline |
Reads capture period latch.
| [in] | qepHandle | Handle to QEP object |
Definition at line 703 of file qep.h.
References _QEP_Obj_::QCPRDLAT.
|
inline |
Reads timer latch.
| [in] | qepHandle | Handle to QEP object |
Definition at line 713 of file qep.h.
References _QEP_Obj_::QCTMRLAT.
|
inline |
Reads interrupt flag value.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEINT | Which interrupt to interrogate |
Definition at line 724 of file qep.h.
References _QEP_Obj_::QEINT, and _QEP_Obj_::QFLG.
|
inline |
Reads position compare register.
| [in] | qepHandle | Handle to QEP object |
Definition at line 734 of file qep.h.
References _QEP_Obj_::QPOSCMP.
|
inline |
Reads position counter.
| [in] | qepHandle | Handle to QEP object |
Definition at line 744 of file qep.h.
References _QEP_Obj_::QPOSCNT.
|
inline |
Reads position counter value index pulse latch register.
| [in] | qepHandle | Handle to QEP object |
Definition at line 754 of file qep.h.
References _QEP_Obj_::QPOSILAT.
|
inline |
Reads position counter value.
| [in] | qepHandle | Handle to QEP object |
Definition at line 764 of file qep.h.
References _QEP_Obj_::QPOSLAT.
|
inline |
Reads position strobe latch.
| [in] | qepHandle | Handle to QEP object |
Definition at line 774 of file qep.h.
References _QEP_Obj_::QPOSSLAT.
|
inline |
Reads status register.
| [in] | qepHandle | Handle to QEP object |
Definition at line 784 of file qep.h.
References _QEP_Obj_::QEPSTS.
|
inline |
Resets counter.
| [in] | qepHandle | Handle to QEP object |
Definition at line 793 of file qep.h.
References QEP_QEPCTL_QPEN, and _QEP_Obj_::QEPCTL.
|
inline |
Resets the individual QEP status register bits.
| [in] | qepHandle | Handle to QEP object |
| [in] | qepsts | Enumeration selection of the QEP status flag to reset |
Definition at line 805 of file qep.h.
References _QEP_Obj_::QEPSTS.
|
inline |
Sets A polarity.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEP_Qap | Channel A polarity |
Definition at line 1111 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_QAP.
|
inline |
Sets B polarity.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEP_Qbp | Channel B polarity |
Definition at line 1124 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_QBP.
|
inline |
Sets capture latch mode.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Qclm | capture latch mode |
Definition at line 817 of file qep.h.
References QEP_QEPCTL_QCLM, and _QEP_Obj_::QEPCTL.
|
inline |
Sets capture period.
| [in] | qepHandle | Handle to QEP object |
| [in] | period | Capture period |
Definition at line 830 of file qep.h.
References _QEP_Obj_::QCPRD.
|
inline |
Sets capture pre-scaler.
| [in] | qepHandle | Handle to QEP object |
| [in] | QCAPCTL_Ccps | Capture pre-scaler |
Definition at line 842 of file qep.h.
References _QEP_Obj_::QCAPCTL, and QEP_QCAPCTL_CCPS.
|
inline |
Sets emulation control.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Freesoft | Emulation control bits |
Definition at line 853 of file qep.h.
References QEP_QEPCTL_FREESOFT, and _QEP_Obj_::QEPCTL.
|
inline |
Sets external clock rate.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEP_Xcr | External clock rate |
Definition at line 866 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_XCR.
|
inline |
Sets the event which initializes the counter register.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Iei | Index event |
Definition at line 879 of file qep.h.
References QEP_QEPCTL_IEI, and _QEP_Obj_::QEPCTL.
|
inline |
Sets the index event which latches the position counter.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Iel | Latch event |
Definition at line 892 of file qep.h.
References QEP_QEPCTL_IEL, and _QEP_Obj_::QEPCTL.
|
inline |
Sets index polarity.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEP_Qip | Index polarity |
Definition at line 905 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_QIP.
|
inline |
Sets max position count.
| [in] | qepHandle | Handle to QEP object |
| [in] | max_count | Maximum counter value |
Definition at line 918 of file qep.h.
References _QEP_Obj_::QPOSMAX.
|
inline |
Sets output pulse width when a match occur.
| [in] | qepHandle | Handle to QEP object |
| [in] | pulse_width | Pulse width value |
Definition at line 930 of file qep.h.
References QEP_QPOSCTL_PCSPW, and _QEP_Obj_::QPOSCTL.
|
inline |
Sets position compare shadow load mode.
| [in] | qepHandle | Handle to QEP object |
| [in] | QPOSCTL_Pcload | PC load event |
Definition at line 945 of file qep.h.
References QEP_QPOSCTL_PCLOAD, and _QEP_Obj_::QPOSCTL.
|
inline |
Sets position counter reset mode.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Pcrm | Position counter reset mode |
Definition at line 958 of file qep.h.
References QEP_QEPCTL_PCRM, and _QEP_Obj_::QEPCTL.
|
inline |
Sets initial position counter value.
| [in] | qepHandle | Handle to QEP object |
| [in] | init_count | initial counter value |
Definition at line 971 of file qep.h.
References _QEP_Obj_::QPOSINIT.
|
inline |
QEP counting mode.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEP_Qsrc | Sets QEP counting mode |
Definition at line 1137 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_QSRC.
|
inline |
Selects whether index or strobe pin is used for sync output.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEP_SPsel | Selected pin |
Definition at line 983 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_SPSEL.
|
inline |
Determines if software initialization of position counter enabled.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Swi | Enable/disable position counter initialization |
Definition at line 996 of file qep.h.
References QEP_QEPCTL_SWI, and _QEP_Obj_::QEPCTL.
|
inline |
Determines strobe initialization of position counter.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Sei | Strobe initialization of position counter (disabled, rising edge of QEPI) or rising/falling depending on direction |
Definition at line 1009 of file qep.h.
References QEP_QEPCTL_SEI, and _QEP_Obj_::QEPCTL.
|
inline |
Sets up strobe latch of position counter.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Sel | Sets strobe latch of position counter |
Definition at line 1022 of file qep.h.
References QEP_QEPCTL_SEL, and _QEP_Obj_::QEPCTL.
|
inline |
Sets up strobe polarity.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEP_Qsp | Strobe polarity |
Definition at line 1035 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_QSP.
|
inline |
Sets up swapping of A/B channels.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEP_Swap | Swap/don't swap A/B channels |
Definition at line 1048 of file qep.h.
References _QEP_Obj_::QDECCTL, and QEP_QDECCTL_SWAP.
|
inline |
Sets synch output compare polarity.
| [in] | qepHandle | Handle to QEP object |
| [in] | QPOSCTL_Pcpol | Polarity of sync output |
Definition at line 1061 of file qep.h.
References QEP_QPOSCTL_PCPOL, and _QEP_Obj_::QPOSCTL.
|
inline |
Sets unit timer period.
| [in] | qepHandle | Handle to QEP object |
| [in] | unit_period | Unit period |
Definition at line 1074 of file qep.h.
References _QEP_Obj_::QUPRD.
|
inline |
Sets unit timer prescaling.
| [in] | qepHandle | Handle to QEP object |
| [in] | QCAPCTL_Upps | Unit timer prescaling |
Definition at line 1086 of file qep.h.
References _QEP_Obj_::QCAPCTL, and QEP_QCAPCTL_UPPS.
|
inline |
Sets watchdog period.
| [in] | qepHandle | Handle to QEP object |
| [in] | watchdog_period | Watchdog period |
Definition at line 1099 of file qep.h.
References _QEP_Obj_::QWDPRD.
|
inline |
QEP strobe latch event.
| [in] | qepHandle | Handle to QEP object |
| [in] | QEPCTL_Sel | Sets QEP strobe latch event |
Definition at line 1152 of file qep.h.
References QEP_QEPCTL_SEL, and _QEP_Obj_::QEPCTL.
|
inline |
Writes a value to the position compare register.
| [in] | qepHandle | Handle to QEP object |
| [in] | posn | Position compare register value |
Definition at line 1166 of file qep.h.
References _QEP_Obj_::QPOSCMP.
1.8.9.1