* \name Values for CONFIG_TIMER.
*
* Select which hardware timer interrupt to use for system clock and softtimers.
* \name Values for CONFIG_TIMER.
*
* Select which hardware timer interrupt to use for system clock and softtimers.
typedef uint8_t hptime_t;
#elif (CONFIG_TIMER == TIMER_ON_OVERFLOW1)
#define TIMER_PRESCALER 1
#define TIMER_HW_BITS 8
typedef uint8_t hptime_t;
#elif (CONFIG_TIMER == TIMER_ON_OVERFLOW1)
#define TIMER_PRESCALER 1
#define TIMER_HW_BITS 8
#define TIMER_HW_CNT (1 << TIMER_HW_BITS)
#define DEFINE_TIMER_ISR SIGNAL(SIG_OVERFLOW1)
#define TIMER_TICKS_PER_SEC ((TIMER_HW_HPTICKS_PER_SEC + TIMER_HW_CNT / 2) / TIMER_HW_CNT)
#define TIMER_HW_CNT (1 << TIMER_HW_BITS)
#define DEFINE_TIMER_ISR SIGNAL(SIG_OVERFLOW1)
#define TIMER_TICKS_PER_SEC ((TIMER_HW_HPTICKS_PER_SEC + TIMER_HW_CNT / 2) / TIMER_HW_CNT)
typedef uint8_t hptime_t;
#elif (CONFIG_TIMER == TIMER_ON_OVERFLOW3)
#define TIMER_PRESCALER 1
#define TIMER_HW_BITS 8
typedef uint8_t hptime_t;
#elif (CONFIG_TIMER == TIMER_ON_OVERFLOW3)
#define TIMER_PRESCALER 1
#define TIMER_HW_BITS 8
#define TIMER_HW_CNT (1 << TIMER_HW_BITS)
#define DEFINE_TIMER_ISR SIGNAL(SIG_OVERFLOW3)
#define TIMER_TICKS_PER_SEC ((TIMER_HW_HPTICKS_PER_SEC + TIMER_HW_CNT / 2) / TIMER_HW_CNT)
#define TIMER_HW_CNT (1 << TIMER_HW_BITS)
#define DEFINE_TIMER_ISR SIGNAL(SIG_OVERFLOW3)
#define TIMER_TICKS_PER_SEC ((TIMER_HW_HPTICKS_PER_SEC + TIMER_HW_CNT / 2) / TIMER_HW_CNT)
* System timer: additional division after the prescaler
* 12288000 / 64 / 192 (0..191) = 1 ms
*/
#define OCR_DIVISOR (((CLOCK_FREQ + TIMER_PRESCALER / 2) / TIMER_PRESCALER + TIMER_TICKS_PER_SEC / 2) / TIMER_TICKS_PER_SEC - 1)
* System timer: additional division after the prescaler
* 12288000 / 64 / 192 (0..191) = 1 ms
*/
#define OCR_DIVISOR (((CLOCK_FREQ + TIMER_PRESCALER / 2) / TIMER_PRESCALER + TIMER_TICKS_PER_SEC / 2) / TIMER_TICKS_PER_SEC - 1)