1 /* 2 * Copyright (c) 2006-2022, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2022-10-19 Nations first version 9 */ 10 11 #ifndef __DRV_HWTIMER__ 12 #define __DRV_HWTIMER__ 13 14 #include <rtthread.h> 15 #include <rtdevice.h> 16 #include <rthw.h> 17 #include <board.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 /* n32 config class */ 24 struct n32_hwtimer_config 25 { 26 const char *name; 27 TIM_Module* timer_periph; 28 IRQn_Type irqn; 29 }; 30 31 struct n32_hwtimer 32 { 33 rt_hwtimer_t time_device; 34 struct n32_hwtimer_config *config; 35 }; 36 37 int rt_hwtimer_init(void); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* __DRV_HWTIMER__ */ 44