HALFRED
0.4.0
|
Descriptor of a TIM object
#include <hali_tim.h>
Data Fields | |
uint32_t | TickTimeBase |
TIM_EventTable * | IntEvents |
TIM_EventTable * | TskEvents |
void(* | Init )(TIMDevice timdevice, uint32_t TickTimeBase) |
void(* | Deinit )(TIMDevice timdevice) |
TIM_Time(* | GetTime )(TIMDevice timdevice) |
void(* | ResetCounter )(TIMDevice timdevice) |
void(* | GetCapabilities )(TIMDevice timdevice, TIM_Capabilities *caps) |
int32_t(* | GetError )(TIMDevice timdevice, uint32_t TickTimeBase) |
int(* | ScheduleEvent )(TIMDevice timdevice, TIM_Time time) |
uint32_t TIMDeviceDesc::TickTimeBase |
Specifies the time between timer ticks in nanoseconds.
TIM_EventTable* TIMDeviceDesc::IntEvents |
Table of interrupt-level events.
TIM_EventTable* TIMDeviceDesc::TskEvents |
Table of task-level events.
void(* TIMDeviceDesc::Init)(TIMDevice timdevice, uint32_t TickTimeBase) |
Initializes specified timer. The timer is started immediately. This function is never called from an interrupt service routine.
timdevice | timer device |
TickTimeBase | time between timer ticks in nanoseconds (timer resolution) |
void(* TIMDeviceDesc::Deinit)(TIMDevice timdevice) |
Deinitializes a specified timer. This function should stop the running timer. This function is never called from an interrupt service routine.
timdevice | timer device |
Gets the current time elapsed since the timer was initialized and started running. This function my be called from an interrupt service routine.
timdevice | timer device |
void(* TIMDeviceDesc::ResetCounter)(TIMDevice timdevice) |
Resets timer's tick counter.
timdevice | timer device |
void(* TIMDeviceDesc::GetCapabilities)(TIMDevice timdevice, TIM_Capabilities *caps) |
Gets hardware capabilities of a timer
timdevice | timer device |
caps | pointer to a structure, where timer capabilities will be stored |
int32_t(* TIMDeviceDesc::GetError)(TIMDevice timdevice, uint32_t TickTimeBase) |
Gets the difference between the selected TickTimeBase and the actual value. This difference is due to hardware capabilities of the timer, and it is expressed in nanoseconds.
timdevice | timer device |
TickTimeBase | selected time base |
Schedules a call to TIM_InterruptProc at the specified time.