summaryrefslogtreecommitdiff
path: root/bsp/nxp/lpc/lpc55sxx/libraries/drivers/drv_timer.h
blob: 413bd46f778246a62fd9f545192c8a29b33bb754 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * Copyright (c) 2006-2023, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
* Change Logs:
* Date           Author       Notes
* 2018-04-17     WangBing     the first version.
*/

#ifndef DRV_CLOCK_TIMER_H__
#define DRV_CLOCK_TIMER_H__

#include <rtthread.h>
#include <rtdevice.h>

#ifdef BSP_USING_CTIMER0
#define TIM1_CONFIG                                         \
    {                                                       \
       .tim_handle              = CTIMER0,                     \
       .tim_irqn                = CTIMER0_IRQn,                \
       .name                    = "timer1",                 \
    }
#endif /* TIM1_CONFIG */

#ifdef BSP_USING_CTIMER3
#define TIM3_CONFIG                                         \
    {                                                       \
       .tim_handle              = CTIMER3,                     \
       .tim_irqn                = CTIMER3_IRQn,                \
       .name                    = "timer2",                 \
    }
#endif /* TIM3_CONFIG */

#ifdef BSP_USING_CTIMER4
#define TIM4_CONFIG                                         \
    {                                                       \
       .tim_handle              = CTIMER4,                     \
       .tim_irqn                = CTIMER4_IRQn,                \
       .name                    = "timer3",                 \
    }
#endif /* TIM4_CONFIG */

int rt_hw_clock_timer_init(void);

#endif /* __DRV_CLOCK_TIMER_H__ */