| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- /*
- * Copyright (c) 2006-2022, RT-Thread Development Team
- *
- * SPDX-License-Identifier: Apache-2.0
- *
- * Change Logs:
- * Date Author Notes
- * 2022-02-22 airm2m first version
- */
- #ifndef __DRV_CLOCK_TIMER_H__
- #define __DRV_CLOCK_TIMER_H__
- #include <rtthread.h>
- #ifdef BSP_USING_TIM
- #include <board.h>
- struct clock_timer_device
- {
- struct rt_clock_timer_device parent;
- TIM_TypeDef *periph;
- IRQn_Type irqn;
- char *name;
- };
- #ifdef BSP_USING_TIM1
- struct clock_timer_device clock_timer_device1 =
- {
- .periph = TIM1,
- .irqn = TIM1_UP_IRQn,
- .name = "timer1"};
- #endif
- #ifdef BSP_USING_TIM2
- struct clock_timer_device clock_timer_device2 =
- {
- .periph = TIM2,
- .irqn = TIM2_IRQn,
- .name = "timer2"};
- #endif
- #ifdef BSP_USING_TIM3
- struct clock_timer_device clock_timer_device3 =
- {
- .periph = TIM3,
- .irqn = TIM3_IRQn,
- .name = "timer3"};
- #endif
- #ifdef BSP_USING_TIM4
- struct clock_timer_device clock_timer_device4 =
- {
- .periph = TIM4,
- .irqn = TIM4_IRQn,
- .name = "timer4"};
- #endif
- #endif /* BSP_USING_CLOCK_TIMER */
- #endif /* __DRV_CLOCK_TIMER_H__ */
|