- software timer is event based
- completed main functions git-svn-id: http://moon:8086/svn/projects/HendiControl@31 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -9,6 +9,21 @@
|
||||
#ifndef TIMER_H_
|
||||
#define TIMER_H_
|
||||
|
||||
#include "fifo.h"
|
||||
|
||||
typedef enum _eTimerId
|
||||
{
|
||||
TIMER_GENERAL = 0,
|
||||
TIMER_TIMEOUT = 1,
|
||||
TIMER_ADC = 2
|
||||
} TimerId;
|
||||
|
||||
typedef struct _sTimer_t
|
||||
{
|
||||
int isRunning;
|
||||
uint16_t count;
|
||||
} Timer_t;
|
||||
|
||||
typedef enum _eTimerClockSel
|
||||
{
|
||||
TimerClockSel_none = 0,
|
||||
@@ -22,7 +37,6 @@ typedef enum _eTimerClockSel
|
||||
TimerClockSel_mask = (1<<CS12) | (1<<CS11) | (1<<CS10),
|
||||
} TimerClockSel;
|
||||
|
||||
void timer_init(uint16_t TIMER_RELOAD, TimerClockSel clockSel);
|
||||
|
||||
|
||||
void timer_init(Fifo *pFifo, uint16_t TIMER_RELOAD, TimerClockSel clockSel);
|
||||
void timer_start(TimerId timerId, uint16_t count);
|
||||
#endif /* TIMER_H_ */
|
||||
Reference in New Issue
Block a user