Hardware Abstraction Layer for FreeRTOS
Collaboration diagram for Counter Subsystem:

Data Structures

struct  counter_generic
 

Enumerations

enum  counter_mode { COUNTER_FALLING, COUNTER_RISING, COUNTER_EITHER }
 

Functions

struct counter * counter_init (uint32_t index, enum counter_mode mode)
 
int32_t counter_deinit (struct counter *counter)
 
int64_t counter_getValue (struct counter *counter)
 
int32_t counter_reset (struct counter *counter)
 

Detailed Description

#include <counter.h>

Enumeration Type Documentation

◆ counter_mode

Enumerator
COUNTER_FALLING 
COUNTER_RISING 
COUNTER_EITHER 

Function Documentation

◆ counter_deinit()

int32_t counter_deinit ( struct counter *  counter)

Deinit Driver Instants

Parameters
counterInstant
Returns
0 on ok -1 on failure

◆ counter_getValue()

int64_t counter_getValue ( struct counter *  counter)

Get Counter Value

Parameters
counterInstant
Returns
>= 0 value -1 on error

◆ counter_init()

struct counter* counter_init ( uint32_t  index,
enum counter_mode  mode 
)

Init Function

Parameters
indexin counters Array
mode
See also
{counter_mode}
Returns
Counter Instants or NULL

◆ counter_reset()

int32_t counter_reset ( struct counter *  counter)
Parameters
counterInstant
Returns
0 on ok -1 on error
counter.h