Port specific time functions


Defines

#define TRPORT_RESPONSE_TIME   { 0, 80 }

Functions

void hal_time_get (trtime_t *lt)
int hal_time_set (const trtime_t *lt)
void hal_alarm_set (const trtime_t *lt)


Define Documentation

#define TRPORT_RESPONSE_TIME   { 0, 80 }

OS response time.

The OS wakes a task at the absolute time specified. There might however be some little overhead involved in waking it up that might delay the wakeup. So a task that wants to wake up for a very short duration of time might actually get delayed because it takes some time for the OS to put it to sleep and wake it up. To avoid this, TiROS takes the response overhead into account when scheduling

Definition at line 344 of file template/tr_port.h.


Function Documentation

void hal_time_get ( trtime_t lt  ) 

Get the current time.

Parameters:
[out] lt Pointer to time structure

int hal_time_set ( const trtime_t lt  ) 

Set the current time.

This may not always be possible, depending on the port.

Parameters:
[in] lt Pointer to time structure.
Returns:
1 if successful, 0 if not possible.

void hal_alarm_set ( const trtime_t lt  ) 

Set an alarm for the specified time.

When the alarm is reached, osint_alarm_reached is called

Parameters:
[in] lt Pointer to time structure. If lt is set to zero, then disable alarms.


TiROS User Manual: Last Updated on Fri Jul 20 10:52:24 2007