1 /* 2 * Copyright (c) 2006-2024 RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2024-07-11 wdfk-prog first version 9 */ 10 11 #ifndef __LPTIM_CONFIG_H__ 12 #define __LPTIM_CONFIG_H__ 13 14 #include <rtthread.h> 15 16 #ifdef __cplusplus 17 extern "C" { 18 #endif 19 20 #ifndef LPTIM_DEV_INFO_CONFIG 21 #define LPTIM_DEV_INFO_CONFIG \ 22 { \ 23 .maxfreq = 1000000, \ 24 .minfreq = 3000, \ 25 .maxcnt = 0xFFFF, \ 26 .cntmode = HWTIMER_CNTMODE_UP, \ 27 } 28 #endif /* TIM_DEV_INFO_CONFIG */ 29 30 #ifdef BSP_USING_LPTIM1 31 #ifndef LPTIM1_CONFIG 32 #define LPTIM1_CONFIG \ 33 { \ 34 .tim_handle.Instance = LPTIM1, \ 35 .tim_irqn = LPTIM1_IRQn, \ 36 .name = "lptim1", \ 37 } 38 #endif /* LPTIM1_CONFIG */ 39 #endif /* BSP_USING_LPTIM1 */ 40 41 #ifdef BSP_USING_LPTIM2 42 #ifndef LPTIM2_CONFIG 43 #define LPTIM2_CONFIG \ 44 { \ 45 .tim_handle.Instance = LPTIM2, \ 46 .tim_irqn = LPTIM2_IRQn, \ 47 .name = "lptim2", \ 48 } 49 #endif /* LPTIM1_CONFIG */ 50 #endif /* BSP_USING_LPTIM1 */ 51 52 #ifdef BSP_USING_LPTIM3 53 #ifndef LPTIM3_CONFIG 54 #define LPTIM3_CONFIG \ 55 { \ 56 .tim_handle.Instance = LPTIM3, \ 57 .tim_irqn = LPTIM3_IRQn, \ 58 .name = "lptim3", \ 59 } 60 #endif /* LPTIM3_CONFIG */ 61 #endif /* BSP_USING_LPTIM3 */ 62 63 #ifdef __cplusplus 64 } 65 #endif 66 67 #endif /* __LPTIM_CONFIG_H__ */ 68