1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/periph/timer: Change timer_init definition to support arbitrary (integer) frequencies

This commit is contained in:
Joakim Nohlgård 2015-10-03 12:40:08 +02:00
parent 5a084b78db
commit 933ee91f72

View File

@ -79,14 +79,14 @@ typedef struct {
* enabled.
*
* @param[in] dev the timer to initialize
* @param[in] us_per_tick number of us passed for one timer tick
* @param[in] freq requested number of ticks per second
* @param[in] callback this callback is called in interrupt context, the
* emitting channel is passed as argument
*
* @return 0 on success
* @return -1 if speed not applicable or unknown device given
*/
int timer_init(tim_t dev, unsigned int us_per_tick, void (*callback)(int));
int timer_init(tim_t dev, unsigned long freq, void (*callback)(int));
/**
* @brief Set a given timer channel for the given timer device