2013-11-27 16:28:31 +01:00
|
|
|
/*
|
2013-06-18 17:21:38 +02:00
|
|
|
* Copyright (C) 2013 Freie Universität Berlin
|
2010-09-22 15:10:42 +02:00
|
|
|
*
|
2013-11-22 20:47:05 +01:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser General
|
2013-06-18 17:21:38 +02:00
|
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
|
|
* details.
|
2013-11-27 16:28:31 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @addtogroup core_hwtimer
|
2010-09-22 15:10:42 +02:00
|
|
|
* @{
|
2013-11-27 16:28:31 +01:00
|
|
|
*
|
|
|
|
* @file hwtimer_arch.h
|
|
|
|
* @brief Architecture specific hwtimer API
|
|
|
|
*
|
|
|
|
* @author Freie Universität Berlin, Computer Systems & Telematics
|
|
|
|
* @author Thomas Hillebrandt <hillebra@inf.fu-berlin.de>
|
|
|
|
* @author Heiko Will <hwill@inf.fu-berlin.de>
|
|
|
|
* @author Kaspar Schleiser <kaspar.schleiser@fu-berlin.de>
|
2010-09-22 15:10:42 +02:00
|
|
|
*/
|
2013-11-27 16:28:31 +01:00
|
|
|
|
2010-09-22 15:10:42 +02:00
|
|
|
#ifndef HWTIMER_ARCH_H_
|
|
|
|
#define HWTIMER_ARCH_H_
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initialize architecture dependent kernel timer support.
|
|
|
|
*/
|
|
|
|
void hwtimer_arch_init(void (*handler)(int), uint32_t fcpu);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enable interrupts of hardware timers.
|
|
|
|
*/
|
|
|
|
void hwtimer_arch_enable_interrupt(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Disable interrupts of hardware timers.
|
|
|
|
*/
|
|
|
|
void hwtimer_arch_disable_interrupt(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a kernel timer to raise an interrupt after ::offset kernel timer ticks
|
|
|
|
* from now.
|
|
|
|
*/
|
|
|
|
void hwtimer_arch_set(unsigned long offset, short timer);
|
|
|
|
|
|
|
|
/**
|
2013-03-07 16:33:33 +01:00
|
|
|
* Set a kernel timer to raise an interrupt at specified system time.
|
2010-09-22 15:10:42 +02:00
|
|
|
*/
|
|
|
|
void hwtimer_arch_set_absolute(unsigned long value, short timer);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unset the kernel timer with the given timer ID.
|
|
|
|
*/
|
|
|
|
void hwtimer_arch_unset(short timer);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the current tick count of the default hardware timer.
|
|
|
|
*/
|
|
|
|
unsigned long hwtimer_arch_now(void);
|
|
|
|
|
2013-11-27 16:28:31 +01:00
|
|
|
/** @} */
|
2010-09-22 15:10:42 +02:00
|
|
|
#endif /* HWTIMER_ARCH_H_ */
|