File indexing completed on 2025-05-11 08:23:02
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 #ifndef LIBBSP_ARM_SHARED_LPC_TIMER_H
0037 #define LIBBSP_ARM_SHARED_LPC_TIMER_H
0038
0039 #include <stdint.h>
0040
0041 #ifdef __cplusplus
0042 extern "C" {
0043 #endif
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062 #define LPC_TIMER_IR_MR0 0x1U
0063 #define LPC_TIMER_IR_MR1 0x2U
0064 #define LPC_TIMER_IR_MR2 0x4U
0065 #define LPC_TIMER_IR_MR3 0x8U
0066 #define LPC_TIMER_IR_CR0 0x10U
0067 #define LPC_TIMER_IR_CR1 0x20U
0068 #define LPC_TIMER_IR_CR2 0x40U
0069 #define LPC_TIMER_IR_CR3 0x80U
0070 #define LPC_TIMER_IR_ALL 0xffU
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080 #define LPC_TIMER_TCR_EN 0x1U
0081 #define LPC_TIMER_TCR_RST 0x2U
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091 #define LPC_TIMER_MCR_MR0_INTR 0x1U
0092 #define LPC_TIMER_MCR_MR0_RST 0x2U
0093 #define LPC_TIMER_MCR_MR0_STOP 0x4U
0094 #define LPC_TIMER_MCR_MR1_INTR 0x8U
0095 #define LPC_TIMER_MCR_MR1_RST 0x10U
0096 #define LPC_TIMER_MCR_MR1_STOP 0x20U
0097 #define LPC_TIMER_MCR_MR2_INTR 0x40U
0098 #define LPC_TIMER_MCR_MR2_RST 0x80U
0099 #define LPC_TIMER_MCR_MR2_STOP 0x100U
0100 #define LPC_TIMER_MCR_MR3_INTR 0x200U
0101 #define LPC_TIMER_MCR_MR3_RST 0x400U
0102 #define LPC_TIMER_MCR_MR3_STOP 0x800U
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112 #define LPC_TIMER_CCR_CAP0_RE 0x1U
0113 #define LPC_TIMER_CCR_CAP0_FE 0x2U
0114 #define LPC_TIMER_CCR_CAP0_INTR 0x4U
0115 #define LPC_TIMER_CCR_CAP1_RE 0x8U
0116 #define LPC_TIMER_CCR_CAP1_FE 0x10U
0117 #define LPC_TIMER_CCR_CAP1_INTR 0x20U
0118 #define LPC_TIMER_CCR_CAP2_RE 0x40U
0119 #define LPC_TIMER_CCR_CAP2_FE 0x80U
0120 #define LPC_TIMER_CCR_CAP2_INTR 0x100U
0121 #define LPC_TIMER_CCR_CAP3_RE 0x200U
0122 #define LPC_TIMER_CCR_CAP3_FE 0x400U
0123 #define LPC_TIMER_CCR_CAP3_INTR 0x800U
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133 #define LPC_TIMER_EMR_EM0_RE 0x1U
0134 #define LPC_TIMER_EMR_EM1_FE 0x2U
0135 #define LPC_TIMER_EMR_EM2_INTR 0x4U
0136 #define LPC_TIMER_EMR_EM3_RE 0x8U
0137 #define LPC_TIMER_EMR_EMC0_FE 0x10U
0138 #define LPC_TIMER_EMR_EMC1_INTR 0x20U
0139 #define LPC_TIMER_EMR_EMC2_RE 0x40U
0140 #define LPC_TIMER_EMR_EMC3_FE 0x80U
0141
0142
0143
0144
0145
0146
0147 typedef struct {
0148 uint32_t ir;
0149 uint32_t tcr;
0150 uint32_t tc;
0151 uint32_t pr;
0152 uint32_t pc;
0153 uint32_t mcr;
0154 uint32_t mr0;
0155 uint32_t mr1;
0156 uint32_t mr2;
0157 uint32_t mr3;
0158 uint32_t ccr;
0159 uint32_t cr0;
0160 uint32_t cr1;
0161 uint32_t cr2;
0162 uint32_t cr3;
0163 uint32_t emr;
0164 uint32_t ctcr;
0165 } lpc_timer;
0166
0167
0168
0169 #ifdef __cplusplus
0170 }
0171 #endif
0172
0173 #endif