2024-01-13 23:06:01 +01:00
|
|
|
#ifndef _BSP_TIMER_H
|
|
|
|
#define _BSP_TIMER_H
|
|
|
|
|
2024-04-15 12:17:01 +02:00
|
|
|
#include <stdint.h>
|
2024-05-29 20:50:30 +02:00
|
|
|
#include "gen/TimerModule.h"
|
2024-01-13 23:06:01 +01:00
|
|
|
|
2024-05-29 20:50:30 +02:00
|
|
|
#define timer_t timermodule_t
|
|
|
|
|
|
|
|
inline void prescaler_init(timer_t* reg, uint16_t value){
|
|
|
|
set_timer_prescaler(reg, value);
|
2024-01-13 23:06:01 +01:00
|
|
|
}
|
|
|
|
|
2024-04-15 12:17:01 +02:00
|
|
|
inline void timer_t0__init(apb3timer_t *reg) {
|
|
|
|
set_timer_t0_overflow(reg, 0xffffffff);
|
2024-01-13 23:06:01 +01:00
|
|
|
}
|
|
|
|
|
2024-04-15 12:17:01 +02:00
|
|
|
inline void timer_t1__init(apb3timer_t *reg) {
|
|
|
|
set_timer_t1_overflow(reg, 0xffffffff);
|
2024-01-13 23:06:01 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* _BSP_TIMER_H */
|