HALFRED  0.4.0
Data Fields
TIMDeviceDesc Struct Reference

Detailed Description

Descriptor of a TIM object

#include <hali_tim.h>

Data Fields

uint32_t TickTimeBase
 
TIM_EventTableIntEvents
 
TIM_EventTableTskEvents
 
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)
 

Field Documentation

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.

Parameters
timdevicetimer device
TickTimeBasetime 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.

Parameters
timdevicetimer device
TIM_Time(* TIMDeviceDesc::GetTime)(TIMDevice timdevice)

Gets the current time elapsed since the timer was initialized and started running. This function my be called from an interrupt service routine.

Parameters
timdevicetimer device
Returns
time elapsed since the timer was initialized
void(* TIMDeviceDesc::ResetCounter)(TIMDevice timdevice)

Resets timer's tick counter.

Parameters
timdevicetimer device
void(* TIMDeviceDesc::GetCapabilities)(TIMDevice timdevice, TIM_Capabilities *caps)

Gets hardware capabilities of a timer

Parameters
timdevicetimer device
capspointer 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.

Parameters
timdevicetimer device
TickTimeBaseselected time base
Returns
selected time base minus actual time base that can be realized by hardware (in nanoseconds)
int(* TIMDeviceDesc::ScheduleEvent)(TIMDevice timdevice, TIM_Time time)

Schedules a call to TIM_InterruptProc at the specified time.


The documentation for this struct was generated from the following file: