См. документацию.
31 #define i_MCU_MODEL 1761
105 #define __MPU_PRESENT 1
106 #define __NVIC_PRIO_BITS 5
107 #define __Vendor_SysTickConfig 0
118 #if defined ( __CC_ARM )
289 #define TIR_MR0I_Msk (1 << 0) // Interrupt flag for match channel 0
290 #define TIR_MR1I_Msk (1 << 1) // Interrupt flag for match channel 1
291 #define TIR_MR2I_Msk (1 << 2) // Interrupt flag for match channel 2
292 #define TIR_MR3I_Msk (1 << 3) // Interrupt flag for match channel 3
293 #define TIR_CR0I_Msk (1 << 4) // Interrupt flag for capture channel 0 event
294 #define TIR_CR1I_Msk (1 << 5) // Interrupt flag for capture channel 1 event
295 #define TIR_CR2I_Msk (1 << 6) // Interrupt flag for capture channel 2 event
296 #define TIR_CR3I_Msk (1 << 7) // Interrupt flag for capture channel 3 event
299 #define PWMIR_MR0I_Msk (1 << 0) // Interrupt flag for match channel 0
300 #define PWMIR_MR1I_Msk (1 << 1) // Interrupt flag for match channel 1
301 #define PWMIR_MR2I_Msk (1 << 2) // Interrupt flag for match channel 2
302 #define PWMIR_MR3I_Msk (1 << 3) // Interrupt flag for match channel 3
303 #define PWMIR_MR4I_Msk (1 << 8) // Interrupt flag for match channel 4
304 #define PWMIR_MR5I_Msk (1 << 9) // Interrupt flag for match channel 5
305 #define PWMIR_MR6I_Msk (1 << 10) // Interrupt flag for match channel 6
306 #define PWMIR_Msk (0x070F)
309 #define TCR_ENABLE_Msk (1 << 0)
310 #define TCR_RESET_Msk (1 << 1)
313 #define TMCR_MR0_I_Msk (1 << 0) // Enable Interrupt when MR0 matches TC
314 #define TMCR_MR0_R_Msk (1 << 1) // Enable Reset of TC upon MR0 match
315 #define TMCR_MR0_S_Msk (1 << 2) // Enable Stop of TC upon MR0 match
316 #define TMCR_MR1_I_Msk (1 << 3) // Enable Interrupt when MR1 matches TC
317 #define TMCR_MR1_R_Msk (1 << 4) // Enable Reset of TC upon MR1 match
318 #define TMCR_MR1_S_Msk (1 << 5) // Enable Stop of TC upon MR1 match
319 #define TMCR_MR2_I_Msk (1 << 6) // Enable Interrupt when MR2 matches TC
320 #define TMCR_MR2_R_Msk (1 << 7) // Enable Reset of TC upon MR2 match
321 #define TMCR_MR2_S_Msk (1 << 8) // Enable Stop of TC upon MR2 match
322 #define TMCR_MR3_I_Msk (1 << 9) // Enable Interrupt when MR3 matches TC
323 #define TMCR_MR3_R_Msk (1 << 10) // Enable Reset of TC upon MR3 match
324 #define TMCR_MR3_S_Msk (1 << 11) // Enable Stop of TC upon MR3 match
327 #define TCCR_CR0_R_Msk (1 << 0) // Enable Rising edge on CAPn.0 will load TC to CR0
328 #define TCCR_CR0_F_Msk (1 << 1) // Enable Falling edge on CAPn.0 will load TC to CR0
329 #define TCCR_CR0_I_Msk (1 << 2) // Enable Interrupt on load of CR0
330 #define TCCR_CR1_R_Msk (1 << 3) // Enable Rising edge on CAPn.1 will load TC to CR1
331 #define TCCR_CR1_F_Msk (1 << 4) // Enable Falling edge on CAPn.1 will load TC to CR1
332 #define TCCR_CR1_I_Msk (1 << 5) // Enable Interrupt on load of CR1
333 #define TCCR_CR2_R_Msk (1 << 6) // Enable Rising edge on CAPn.2 will load TC to CR2
334 #define TCCR_CR2_F_Msk (1 << 7) // Enable Falling edge on CAPn.2 will load TC to CR2
335 #define TCCR_CR2_I_Msk (1 << 8) // Enable Interrupt on load of CR2
336 #define TCCR_CR3_R_Msk (1 << 9) // Enable Rising edge on CAPn.3 will load TC to CR3
337 #define TCCR_CR3_F_Msk (1 << 10) // Enable Falling edge on CAPn.3 will load TC to CR3
338 #define TCCR_CR3_I_Msk (1 << 11) // Enable Interrupt on load of CR3
364 #define PWMCR_ENABLE_Msk (1 << 0)
365 #define PWMCR_RESET_Msk (1 << 1)
1006 #if defined ( __CC_ARM )
1007 #pragma no_anon_unions
1015 #define LPC_FLASH_BASE (0x00000000UL)
1016 #define LPC_RAM_BASE (0x10000000UL)
1017 #ifdef __LPC17XX_REV00
1018 #define LPC_AHBRAM0_BASE (0x20000000UL)
1019 #define LPC_AHBRAM1_BASE (0x20004000UL)
1021 #define LPC_AHBRAM0_BASE (0x2007C000UL)
1022 #define LPC_AHBRAM1_BASE (0x20080000UL)
1024 #define LPC_GPIO_BASE (0x2009C000UL)
1025 #define LPC_APB0_BASE (0x40000000UL)
1026 #define LPC_APB1_BASE (0x40080000UL)
1027 #define LPC_AHB_BASE (0x50000000UL)
1028 #define LPC_CM3_BASE (0xE0000000UL)
1031 #define LPC_WDT_BASE (LPC_APB0_BASE + 0x00000)
1032 #define LPC_TIM0_BASE (LPC_APB0_BASE + 0x04000)
1033 #define LPC_TIM1_BASE (LPC_APB0_BASE + 0x08000)
1034 #define LPC_UART0_BASE (LPC_APB0_BASE + 0x0C000)
1035 #define LPC_UART1_BASE (LPC_APB0_BASE + 0x10000)
1036 #define LPC_PWM1_BASE (LPC_APB0_BASE + 0x18000)
1037 #define LPC_I2C0_BASE (LPC_APB0_BASE + 0x1C000)
1038 #define LPC_SPI_BASE (LPC_APB0_BASE + 0x20000)
1039 #define LPC_RTC_BASE (LPC_APB0_BASE + 0x24000)
1040 #define LPC_GPIOINT_BASE (LPC_APB0_BASE + 0x28080)
1041 #define LPC_PINCON_BASE (LPC_APB0_BASE + 0x2C000)
1042 #define LPC_SSP1_BASE (LPC_APB0_BASE + 0x30000)
1043 #define LPC_ADC_BASE (LPC_APB0_BASE + 0x34000)
1044 #define LPC_CANAF_RAM_BASE (LPC_APB0_BASE + 0x38000)
1045 #define LPC_CANAF_BASE (LPC_APB0_BASE + 0x3C000)
1046 #define LPC_CANCR_BASE (LPC_APB0_BASE + 0x40000)
1047 #define LPC_CAN1_BASE (LPC_APB0_BASE + 0x44000)
1048 #define LPC_CAN2_BASE (LPC_APB0_BASE + 0x48000)
1049 #define LPC_I2C1_BASE (LPC_APB0_BASE + 0x5C000)
1052 #define LPC_SSP0_BASE (LPC_APB1_BASE + 0x08000)
1053 #define LPC_DAC_BASE (LPC_APB1_BASE + 0x0C000)
1054 #define LPC_TIM2_BASE (LPC_APB1_BASE + 0x10000)
1055 #define LPC_TIM3_BASE (LPC_APB1_BASE + 0x14000)
1056 #define LPC_UART2_BASE (LPC_APB1_BASE + 0x18000)
1057 #define LPC_UART3_BASE (LPC_APB1_BASE + 0x1C000)
1058 #define LPC_I2C2_BASE (LPC_APB1_BASE + 0x20000)
1059 #define LPC_I2S_BASE (LPC_APB1_BASE + 0x28000)
1060 #define LPC_RIT_BASE (LPC_APB1_BASE + 0x30000)
1061 #define LPC_MCPWM_BASE (LPC_APB1_BASE + 0x38000)
1062 #define LPC_QEI_BASE (LPC_APB1_BASE + 0x3C000)
1063 #define LPC_SC_BASE (LPC_APB1_BASE + 0x7C000)
1066 #define LPC_EMAC_BASE (LPC_AHB_BASE + 0x00000)
1067 #define LPC_GPDMA_BASE (LPC_AHB_BASE + 0x04000)
1068 #define LPC_GPDMACH0_BASE (LPC_AHB_BASE + 0x04100)
1069 #define LPC_GPDMACH1_BASE (LPC_AHB_BASE + 0x04120)
1070 #define LPC_GPDMACH2_BASE (LPC_AHB_BASE + 0x04140)
1071 #define LPC_GPDMACH3_BASE (LPC_AHB_BASE + 0x04160)
1072 #define LPC_GPDMACH4_BASE (LPC_AHB_BASE + 0x04180)
1073 #define LPC_GPDMACH5_BASE (LPC_AHB_BASE + 0x041A0)
1074 #define LPC_GPDMACH6_BASE (LPC_AHB_BASE + 0x041C0)
1075 #define LPC_GPDMACH7_BASE (LPC_AHB_BASE + 0x041E0)
1076 #define LPC_USB_BASE (LPC_AHB_BASE + 0x0C000)
1079 #define LPC_GPIO0_BASE (LPC_GPIO_BASE + 0x00000)
1080 #define LPC_GPIO1_BASE (LPC_GPIO_BASE + 0x00020)
1081 #define LPC_GPIO2_BASE (LPC_GPIO_BASE + 0x00040)
1082 #define LPC_GPIO3_BASE (LPC_GPIO_BASE + 0x00060)
1083 #define LPC_GPIO4_BASE (LPC_GPIO_BASE + 0x00080)
1088 #define LPC_SC ((LPC_SC_TypeDef *) LPC_SC_BASE )
1089 #define LPC_GPIO0 ((LPC_GPIO_TypeDef *) LPC_GPIO0_BASE )
1090 #define LPC_GPIO1 ((LPC_GPIO_TypeDef *) LPC_GPIO1_BASE )
1091 #define LPC_GPIO2 ((LPC_GPIO_TypeDef *) LPC_GPIO2_BASE )
1092 #define LPC_GPIO3 ((LPC_GPIO_TypeDef *) LPC_GPIO3_BASE )
1093 #define LPC_GPIO4 ((LPC_GPIO_TypeDef *) LPC_GPIO4_BASE )
1094 #define LPC_WDT ((LPC_WDT_TypeDef *) LPC_WDT_BASE )
1095 #define LPC_TIM0 ((LPC_TIM_TypeDef *) LPC_TIM0_BASE )
1096 #define LPC_TIM1 ((LPC_TIM_TypeDef *) LPC_TIM1_BASE )
1097 #define LPC_TIM2 ((LPC_TIM_TypeDef *) LPC_TIM2_BASE )
1098 #define LPC_TIM3 ((LPC_TIM_TypeDef *) LPC_TIM3_BASE )
1099 #define LPC_RIT ((LPC_RIT_TypeDef *) LPC_RIT_BASE )
1100 #define LPC_UART0 ((LPC_UART_TypeDef *) LPC_UART0_BASE )
1101 #define LPC_UART1 ((LPC_UART1_TypeDef *) LPC_UART1_BASE )
1102 #define LPC_UART2 ((LPC_UART_TypeDef *) LPC_UART2_BASE )
1103 #define LPC_UART3 ((LPC_UART_TypeDef *) LPC_UART3_BASE )
1104 #define LPC_PWM1 ((LPC_PWM_TypeDef *) LPC_PWM1_BASE )
1105 #define LPC_I2C0 ((LPC_I2C_TypeDef *) LPC_I2C0_BASE )
1106 #define LPC_I2C1 ((LPC_I2C_TypeDef *) LPC_I2C1_BASE )
1107 #define LPC_I2C2 ((LPC_I2C_TypeDef *) LPC_I2C2_BASE )
1108 #define LPC_I2S ((LPC_I2S_TypeDef *) LPC_I2S_BASE )
1109 #define LPC_SPI ((LPC_SPI_TypeDef *) LPC_SPI_BASE )
1110 #define LPC_RTC ((LPC_RTC_TypeDef *) LPC_RTC_BASE )
1111 #define LPC_GPIOINT ((LPC_GPIOINT_TypeDef *) LPC_GPIOINT_BASE )
1112 #define LPC_PINCON ((LPC_PINCON_TypeDef *) LPC_PINCON_BASE )
1113 #define LPC_SSP0 ((LPC_SSP_TypeDef *) LPC_SSP0_BASE )
1114 #define LPC_SSP1 ((LPC_SSP_TypeDef *) LPC_SSP1_BASE )
1115 #define LPC_ADC ((LPC_ADC_TypeDef *) LPC_ADC_BASE )
1116 #define LPC_DAC ((LPC_DAC_TypeDef *) LPC_DAC_BASE )
1117 #define LPC_CANAF_RAM ((LPC_CANAF_RAM_TypeDef *) LPC_CANAF_RAM_BASE)
1118 #define LPC_CANAF ((LPC_CANAF_TypeDef *) LPC_CANAF_BASE )
1119 #define LPC_CANCR ((LPC_CANCR_TypeDef *) LPC_CANCR_BASE )
1120 #define LPC_CAN1 ((LPC_CAN_TypeDef *) LPC_CAN1_BASE )
1121 #define LPC_CAN2 ((LPC_CAN_TypeDef *) LPC_CAN2_BASE )
1122 #define LPC_MCPWM ((LPC_MCPWM_TypeDef *) LPC_MCPWM_BASE )
1123 #define LPC_QEI ((LPC_QEI_TypeDef *) LPC_QEI_BASE )
1124 #define LPC_EMAC ((LPC_EMAC_TypeDef *) LPC_EMAC_BASE )
1125 #define LPC_GPDMA ((LPC_GPDMA_TypeDef *) LPC_GPDMA_BASE )
1126 #define LPC_GPDMACH0 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH0_BASE )
1127 #define LPC_GPDMACH1 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH1_BASE )
1128 #define LPC_GPDMACH2 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH2_BASE )
1129 #define LPC_GPDMACH3 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH3_BASE )
1130 #define LPC_GPDMACH4 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH4_BASE )
1131 #define LPC_GPDMACH5 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH5_BASE )
1132 #define LPC_GPDMACH6 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH6_BASE )
1133 #define LPC_GPDMACH7 ((LPC_GPDMACH_TypeDef *) LPC_GPDMACH7_BASE )
1134 #define LPC_USB ((LPC_USB_TypeDef *) LPC_USB_BASE )
1140 #endif // __LPC17xx_H__