SAMV71 Xplained Ultra Software Package 1.5

timetick.h File Reference

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  SyTickDelayCounter_t
struct  TimeEvent

Functions

uint32_t TimeTick_Configure (void)
 Configures the System Timer. Systick interrupt handler will generates 1ms interrupt and increase a tickCount.
void TimeTick_Increment (uint32_t dwInc)
uint32_t GetDelayInTicks (uint32_t startTick, uint32_t endTick)
 Get Delayed number of tick.
uint32_t GetTicks (void)
 Get Delayed number of tick.
void Wait (volatile uint32_t dwMs)
 Sync Wait for several ms.
void Sleep (volatile uint32_t dwMs)
 Sync Sleep for several ms.
void SetTimeEvent (TimeEvent *pEvent)

Detailed Description

Purpose

Methods and definitions for Global time tick and wait functions.

Defines a common and simplest use of Time Tick, to increase tickCount every 1ms, the application can get this value through GetTickCount().

Usage
  1. Configure the System Tick with TimeTick_Configure() when MCK changed
    Note:
    Must be done before any invoke of GetTickCount(), Wait() or Sleep().
  2. Uses GetTickCount to get current tick value.
  3. Uses Wait to wait several ms.
  4. Uses Sleep to enter wait for interrupt mode to wait several ms.

Definition in file timetick.h.


Function Documentation

uint32_t GetDelayInTicks ( uint32_t  startTick,
uint32_t  endTick 
)

Get Delayed number of tick.

Parameters:
startTick Start tick point.
endTick End tick point.

Definition at line 134 of file timetick.c.

uint32_t GetTicks ( void   ) 

Get Delayed number of tick.

Parameters:
startTick Start tick point.
endTick End tick point.

Definition at line 149 of file timetick.c.

void Sleep ( volatile uint32_t  dwMs  ) 

Sync Sleep for several ms.

Parameters:
dwMs Sleeping time in ms.

Definition at line 177 of file timetick.c.

Here is the call graph for this function:

uint32_t TimeTick_Configure ( void   ) 

Configures the System Timer. Systick interrupt handler will generates 1ms interrupt and increase a tickCount.

Note:
IRQ handler must be configured before invoking this function.

Definition at line 99 of file timetick.c.

void Wait ( volatile uint32_t  dwMs  ) 

Sync Wait for several ms.

Parameters:
dwMs Waiting time in ms.

Definition at line 160 of file timetick.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines