|
MotorWare f2806x Driver API Documentation
|
Data Structures | |
| struct | _TIMER_Obj_ |
| Defines the timer (TIMER) object. More... | |
Macros | |
| #define | TIMER0_BASE_ADDR (0x00000C00) |
| Defines the base address of the timer (TIMER) 0 registers. More... | |
| #define | TIMER1_BASE_ADDR (0x00000C08) |
| Defines the base address of the timer (TIMER) 1 registers. More... | |
| #define | TIMER2_BASE_ADDR (0x00000C10) |
| Defines the base address of the timer (TIMER) 2 registers. More... | |
| #define | TIMER_TCR_TSS_BITS (1 << 4) |
| Defines the location of the TSS bits in the TCR register. More... | |
| #define | TIMER_TCR_TRB_BITS (1 << 5) |
| Defines the location of the TRB bits in the TCR register. More... | |
| #define | TIMER_TCR_FREESOFT_BITS (3 << 10) |
| Defines the location of the FREESOFT bits in the TCR register. More... | |
| #define | TIMER_TCR_TIE_BITS (1 << 14) |
| Defines the location of the TIE bits in the TCR register. More... | |
| #define | TIMER_TCR_TIF_BITS (1 << 15) |
| Defines the location of the TIF bits in the TCR register. More... | |
Typedefs | |
| typedef struct _TIMER_Obj_ | TIMER_Obj |
| Defines the timer (TIMER) object. More... | |
| typedef struct _TIMER_Obj_ * | TIMER_Handle |
| Defines the timer (TIMER) handle. More... | |
Enumerations | |
| enum | TIMER_EmulationMode_e { TIMER_EmulationMode_StopAfterNextDecrement =(0 << 10), TIMER_EmulationMode_StopAtZero =(1 << 10), TIMER_EmulationMode_RunFree =(2 << 10) } |
| Enumeration to define the timer (TIMER) emulation mode. More... | |
| enum | TIMER_Status_e { TIMER_Status_CntIsNotZero =(0 << 15), TIMER_Status_CntIsZero =(1 << 15) } |
| Enumeration to define the timer (TIMER) status. More... | |
Functions | |
| void | TIMER_clearFlag (TIMER_Handle timerHandle) |
| Clears the timer (TIMER) flag. More... | |
| void | TIMER_disableInt (TIMER_Handle timerHandle) |
| Disables the timer (TIMER) interrupt. More... | |
| void | TIMER_enableInt (TIMER_Handle timerHandle) |
| Enables the timer (TIMER) interrupt. More... | |
| static uint32_t | TIMER_getCount (TIMER_Handle timerHandle) |
| Gets the timer (TIMER) count. More... | |
| TIMER_Status_e | TIMER_getStatus (TIMER_Handle timerHandle) |
| Gets the timer (TIMER) status. More... | |
| TIMER_Handle | TIMER_init (void *pMemory, const size_t numBytes) |
| Initializes the timer (TIMER) object handle. More... | |
| static void | TIMER_reload (TIMER_Handle timerHandle) |
| Reloads the timer (TIMER) value. More... | |
| void | TIMER_setDecimationFactor (TIMER_Handle timerHandle, const uint16_t decFactor) |
| Sets the timer (TIMER) decimation factor. More... | |
| void | TIMER_setEmulationMode (TIMER_Handle timerHandle, const TIMER_EmulationMode_e mode) |
| Sets the timer (TIMER) emulation mode. More... | |
| static uint32_t | TIMER_getPeriod (TIMER_Handle timerHandle) |
| Gets the timer (TIMER) period. More... | |
| static void | TIMER_setPeriod (TIMER_Handle timerHandle, const uint32_t period) |
| Sets the timer (TIMER) period. More... | |
| void | TIMER_setPreScaler (TIMER_Handle timerHandle, const uint16_t preScaler) |
| Sets the timer (TIMER) prescaler. More... | |
| static void | TIMER_start (TIMER_Handle timerHandle) |
| Starts the timer (TIMER) More... | |
| static void | TIMER_stop (TIMER_Handle timerHandle) |
| Stops the timer (TIMER) More... | |
| struct _TIMER_Obj_ |
| #define TIMER0_BASE_ADDR (0x00000C00) |
| #define TIMER1_BASE_ADDR (0x00000C08) |
| #define TIMER2_BASE_ADDR (0x00000C10) |
| #define TIMER_TCR_FREESOFT_BITS (3 << 10) |
Defines the location of the FREESOFT bits in the TCR register.
Definition at line 86 of file timer.h.
Referenced by TIMER_setEmulationMode().
| #define TIMER_TCR_TIE_BITS (1 << 14) |
Defines the location of the TIE bits in the TCR register.
Definition at line 90 of file timer.h.
Referenced by TIMER_disableInt(), and TIMER_enableInt().
| #define TIMER_TCR_TIF_BITS (1 << 15) |
Defines the location of the TIF bits in the TCR register.
Definition at line 94 of file timer.h.
Referenced by TIMER_clearFlag(), and TIMER_getStatus().
| #define TIMER_TCR_TRB_BITS (1 << 5) |
Defines the location of the TRB bits in the TCR register.
Definition at line 82 of file timer.h.
Referenced by TIMER_reload().
| #define TIMER_TCR_TSS_BITS (1 << 4) |
Defines the location of the TSS bits in the TCR register.
Definition at line 78 of file timer.h.
Referenced by TIMER_start(), and TIMER_stop().
| typedef struct _TIMER_Obj_* TIMER_Handle |
| typedef struct _TIMER_Obj_ TIMER_Obj |
Defines the timer (TIMER) object.
Enumeration to define the timer (TIMER) emulation mode.
| enum TIMER_Status_e |
| void TIMER_clearFlag | ( | TIMER_Handle | timerHandle | ) |
Clears the timer (TIMER) flag.
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 55 of file timer.c.
References _TIMER_Obj_::TCR, and TIMER_TCR_TIF_BITS.
| void TIMER_disableInt | ( | TIMER_Handle | timerHandle | ) |
Disables the timer (TIMER) interrupt.
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 67 of file timer.c.
References _TIMER_Obj_::TCR, and TIMER_TCR_TIE_BITS.
| void TIMER_enableInt | ( | TIMER_Handle | timerHandle | ) |
Enables the timer (TIMER) interrupt.
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 79 of file timer.c.
References _TIMER_Obj_::TCR, and TIMER_TCR_TIE_BITS.
|
inlinestatic |
Gets the timer (TIMER) count.
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 163 of file timer.h.
References _TIMER_Obj_::TIM.
|
inlinestatic |
Gets the timer (TIMER) period.
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 219 of file timer.h.
References _TIMER_Obj_::PRD.
| TIMER_Status_e TIMER_getStatus | ( | TIMER_Handle | timerHandle | ) |
Gets the timer (TIMER) status.
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 91 of file timer.c.
References _TIMER_Obj_::TCR, and TIMER_TCR_TIF_BITS.
| TIMER_Handle TIMER_init | ( | void * | pMemory, |
| const size_t | numBytes | ||
| ) |
|
inlinestatic |
Reloads the timer (TIMER) value.
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 190 of file timer.h.
References _TIMER_Obj_::TCR, and TIMER_TCR_TRB_BITS.
| void TIMER_setDecimationFactor | ( | TIMER_Handle | timerHandle, |
| const uint16_t | decFactor | ||
| ) |
Sets the timer (TIMER) decimation factor.
| [in] | timerHandle | The timer (TIMER) object handle |
| [in] | decFactor | The timer decimation factor |
Definition at line 118 of file timer.c.
References _TIMER_Obj_::TPR.
| void TIMER_setEmulationMode | ( | TIMER_Handle | timerHandle, |
| const TIMER_EmulationMode_e | mode | ||
| ) |
Sets the timer (TIMER) emulation mode.
| [in] | timerHandle | The timer (TIMER) object handle |
| [in] | mode | The emulation mode |
Definition at line 132 of file timer.c.
References _TIMER_Obj_::TCR, and TIMER_TCR_FREESOFT_BITS.
|
inlinestatic |
Sets the timer (TIMER) period.
| [in] | timerHandle | The timer (TIMER) object handle |
| [in] | period | The period |
Definition at line 234 of file timer.h.
References _TIMER_Obj_::PRD.
| void TIMER_setPreScaler | ( | TIMER_Handle | timerHandle, |
| const uint16_t | preScaler | ||
| ) |
Sets the timer (TIMER) prescaler.
| [in] | timerHandle | The timer (TIMER) object handle |
| [in] | preScaler | The preScaler value |
Definition at line 148 of file timer.c.
References _TIMER_Obj_::TPR.
|
inlinestatic |
Starts the timer (TIMER)
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 256 of file timer.h.
References _TIMER_Obj_::TCR, and TIMER_TCR_TSS_BITS.
|
inlinestatic |
Stops the timer (TIMER)
| [in] | timerHandle | The timer (TIMER) object handle |
Definition at line 270 of file timer.h.
References _TIMER_Obj_::TCR, and TIMER_TCR_TSS_BITS.
1.8.9.1