API  2.2
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions

Functions

uint8_t TSMART_TIMER_Init (tsmart_timer_t *TSMART_TIMER)
 Initialize a selected Timer. More...
 
uint8_t TSMART_TIMERT_Config (tsmart_timer_t *TSMART_TIMER, tsmart_timer_config_t *TSMART_TIMER_config)
 Configures timer. More...
 
uint8_t TSMART_TIMER_Start (tsmart_timer_t *TSMART_TIMER)
 Starts Timer. More...
 
uint32_t TSMART_TIMER_Stop (tsmart_timer_t *TSMART_TIMER)
 Stops Timer. More...
 
uint32_t TSMART_TIMER_GetValue (tsmart_timer_t *TSMART_TIMER)
 Gets value form Timer. More...
 
uint16_t TSMART_TIMER_Wfi (tsmart_timer_t *TSMART_TIMER, portTickType TSMART_TIMER_xticks)
 Wait for the interrupt of the Selected Timer. More...
 

Detailed Description

Function Documentation

uint32_t TSMART_TIMER_GetValue ( tsmart_timer_t TSMART_TIMER)

Gets value form Timer.

Parameters
TSMART_TIMERTimer structure handler.
Returns
  • Time in tenth of milisecods.
uint8_t TSMART_TIMER_Init ( tsmart_timer_t TSMART_TIMER)

Initialize a selected Timer.

This functions initializes the hardware configuration of the selected TIMER and the associated OS mechanisms.

Users can choose between delay timers or chrono timers:

<ul><li> tsmart_timer_dc - It can work in both modes: chrono and dealy.</li>
<li> tsmart_timer_c1 - It can only work in chrono mode.</li>
    <li> tsmart_timer_c2 - It can only work in chrono mode.</li></ul>

Predefined handlers for these timers can be found in the following link: Variables

Parameters
TSMART_TIMERTimer structure handler.
Returns
  • TSMART_PASS - OK
Examples:
timer.c.
uint8_t TSMART_TIMER_Start ( tsmart_timer_t TSMART_TIMER)

Starts Timer.

Parameters
TSMART_TIMERTimer structure handler.
Returns
  • TSMART_PASS - OK
Examples:
timer.c.
uint32_t TSMART_TIMER_Stop ( tsmart_timer_t TSMART_TIMER)

Stops Timer.

Parameters
TSMART_TIMERTimer structure handler.
Returns
  • Time in tenth of miliseconds
Examples:
timer.c.
uint16_t TSMART_TIMER_Wfi ( tsmart_timer_t TSMART_TIMER,
portTickType  TSMART_TIMER_xticks 
)

Wait for the interrupt of the Selected Timer.

Waits for the interrupt associated to a Timer. Whenever the Timer is expire, a handler will be triggered and a semaphore will be set.

Parameters
TSMART_TIMERTimer structure handler.
TSMART_TIMER_xticksMaximum timeout
Returns
  • TSMART_PASS - OK
  • TSMART_FAIL - Timeout expired.
Examples:
timer.c.
uint8_t TSMART_TIMERT_Config ( tsmart_timer_t TSMART_TIMER,
tsmart_timer_config_t TSMART_TIMER_config 
)

Configures timer.

Parameters
TSMART_TIMERTimer structure handler.
TSMART_TIMER_configConfiguration for the timer.
Returns
  • TSMART_PASS - OK
Examples:
timer.c.