Merge branch 'cmake_flow' into develop
This commit is contained in:
		
							
								
								
									
										20
									
								
								include/minres/devices/timer.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								include/minres/devices/timer.h
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| #ifndef _DEVICES_TIMER_H | ||||
| #define _DEVICES_TIMER_H | ||||
|  | ||||
| #include <stdint.h> | ||||
|  | ||||
| #include "gen/timercounter.h" | ||||
|  | ||||
| static inline void prescaler_init(timercounter_t *reg, uint16_t value) { | ||||
|   set_timercounter_prescaler(reg, value); | ||||
| } | ||||
|  | ||||
| static inline void timer_t0__init(timercounter_t *reg) { | ||||
|   set_timercounter_t0_overflow(reg, 0xffffffff); | ||||
| } | ||||
|  | ||||
| static inline void timer_t1__init(timercounter_t *reg) { | ||||
|   set_timercounter_t1_overflow(reg, 0xffffffff); | ||||
| } | ||||
|  | ||||
| #endif /* _DEVICES_TIMER_H */ | ||||
		Reference in New Issue
	
	Block a user