mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 10:32:44 +01:00
make LTC_TIMER_INTERVAL a named define
This commit is contained in:
parent
ed4ed963ce
commit
7bc09fdc0f
@ -29,6 +29,7 @@
|
||||
#include "hwtimer.h"
|
||||
|
||||
#define native_ltc4150_startup_delay 10
|
||||
#define LTC_TIMER_INTERVAL (100 * 1000UL) // 100 ms
|
||||
|
||||
static int _int_enabled;
|
||||
static int hwtimer_id;
|
||||
@ -41,7 +42,7 @@ static void _int_handler()
|
||||
DEBUG("ltc4150 _int_handler()\n");
|
||||
ltc4150_interrupt();
|
||||
if (_int_enabled == 1) {
|
||||
hwtimer_id = hwtimer_set(100000, _int_handler, NULL);
|
||||
hwtimer_id = hwtimer_set(LTC_TIMER_INTERVAL, _int_handler, NULL);
|
||||
if (hwtimer_id == -1) {
|
||||
errx(1, "_int_handler: hwtimer_set");
|
||||
}
|
||||
@ -65,7 +66,7 @@ void ltc4150_enable_int(void)
|
||||
{
|
||||
DEBUG("ltc4150_enable_int()\n");
|
||||
_int_enabled = 1;
|
||||
hwtimer_id = hwtimer_set(100000, _int_handler, NULL);
|
||||
hwtimer_id = hwtimer_set(LTC_TIMER_INTERVAL, _int_handler, NULL);
|
||||
if (hwtimer_id == -1) {
|
||||
errx(1, "ltc4150_enable_int: hwtimer_set");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user