Files
OpenEPaperLink/zbs243_shared/soc/zbs243/timer.h
2023-03-27 15:32:37 +02:00

25 lines
558 B
C

#ifndef _TIMER_H_
#define _TIMER_H_
#include <stdint.h>
#define TIMER_TICKS_PER_SECOND (16000000 / 12) //overflows every 53 minutes
#define TIMER_TICKS_PER_MS 1333UL
//this is a requirement by SDCC. is this prototype is missing when compiling main(), we get no irq handler
void T0_ISR(void) __interrupt (1);
void timerInit(void);
#pragma callee_saves timerGet
uint32_t timerGet(void);
#pragma callee_saves timerGetLowBits
uint8_t timerGetLowBits(void); //probaly only useful for random seeds
void timerDelay(uint32_t ticks);
#endif