timer Class Reference

Timer Class This class allows the creation of multiple timers that are based by a divider on a single system timer. More...

`#include <timer.h>`

## Public Member Functions

| timer (void(*handler)(void))
| Timer constructor Depending on the call of the constructor the handler will be called as thread or not. More...
| timer (void *(*handler)(void *))
void | setDivider (int divider)
| sets the divider for this timer (based on system timer) More...
int | getDivider ()
| reads the timer divider More...
void | call ()
| Calls the timer handler if enabled. More...
void | start ()
| enables the timer More...
void | stop ()
| disables the timer More...
bool | isActive ()
| Returns the timers active state. More...

## Data Fields

timer * | next
| contains the pointer on the next timer element of the list More...

## Detailed Description

Timer Class This class allows the creation of multiple timers that are based by a divider on a single system timer.

## Constructor & Destructor Documentation

timer::timer | ( | void(*)(void) | handler | ) |

Timer constructor Depending on the call of the constructor the handler will be called as thread or not.

Parameters

  *handler | target pointer to the method

timer::timer | ( | void *(*)(void *) | handler | ) |

## Member Function Documentation

void timer::call | ( |  | ) |

Calls the timer handler if enabled.

int timer::getDivider | ( |  | ) |

reads the timer divider

Returns
  timer divider

bool timer::isActive | ( |  | ) |

Returns the timers active state.

Returns
  true if active

void timer::setDivider | ( | int | divider | ) |

sets the divider for this timer (based on system timer)

Parameters

  divider | integer timer divider

void timer::start | ( |  | ) |

enables the timer

void timer::stop | ( |  | ) |

disables the timer

## Field Documentation

timer* timer::next

contains the pointer on the next timer element of the list

The documentation for this class was generated from the following files:

- timer.h
- timer.cpp