NetBurner 3.5.6
PDF Version
timer_dispatch.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
5#ifndef _TIMER_DISPATCH_H
6#define _TIMER_DISPATCH_H
7
8#include <predef.h>
9#include <constants.h>
10#include <sim.h>
11
12/* Adds a timer dispatch capability to the system so timers can be used for multiple independent functions */
13
14// ISR callback will have timer number and a channel object
15typedef void (*TimerIsrHandler)(int timer_num, TcChannel &tc, void *pExtra);
16
17// Returns timer allocated, or -1 if timer selected is in use, or -2 if none are available
18int AllocateTimer( TimerIsrHandler tisr, void *pExtra, int timer = FIRST_UNUSED_TIMER);
19void FreeTimer(int timer);
20
21// helper functions
22IRQn GetTimerPeriphID(int timer);
23TcChannel *GetTc(int timer);
24
25#endif
IRQn
Interrupt Number Definitions.
Definition SAME70/include/cm_core_config.h:60
NetBurner System Constants.
#define FIRST_UNUSED_TIMER
Definition constants.h:580