MNRS-BM-BSP/include/ehrenberg/devices/timer.h

20 lines
450 B
C
Raw Normal View History

2024-05-30 18:32:23 +02:00
#ifndef _DEVICES_TIMER_H
#define _DEVICES_TIMER_H
2024-01-13 23:06:01 +01:00
2024-04-15 12:17:01 +02:00
#include <stdint.h>
2024-05-30 18:32:23 +02:00
#include "gen/timercounter.h"
2024-01-13 23:06:01 +01:00
2024-05-30 18:32:23 +02:00
inline void prescaler_init(timercounter_t* reg, uint16_t value){
set_timercounter_prescaler(reg, value);
2024-01-13 23:06:01 +01:00
}
2024-05-30 18:32:23 +02:00
inline void timer_t0__init(timercounter_t *reg){
set_timercounter_t0_overflow(reg, 0xffffffff);
2024-01-13 23:06:01 +01:00
}
2024-05-30 18:32:23 +02:00
inline void timer_t1__init(timercounter_t *reg){
set_timercounter_t1_overflow(reg, 0xffffffff);
2024-01-13 23:06:01 +01:00
}
2024-05-30 18:32:23 +02:00
#endif /* _DEVICES_TIMER_H */