Quellcode durchsuchen

update:中断宏定义更换

alienwalker vor 4 Jahren
Ursprung
Commit
033809c1b6

+ 2 - 2
bsp/air105/hal/core_adc.c

@@ -88,7 +88,7 @@ void ADC_GlobalInit(void)
 	ADC0->ADC_CR2 &= ~(1 << 13);
     ISR_SetHandler(ADC0_IRQn, ADC_IrqHandle, NULL);
 #ifdef __BUILD_OS___
-	ISR_SetPriority(ADC0_IRQn, configLIBRARY_LOWEST_INTERRUPT_PRIORITY);
+	ISR_SetPriority(ADC0_IRQn, IRQ_LOWEST_PRIORITY);
 #else
 	ISR_SetPriority(ADC0_IRQn, 6);
 #endif
@@ -180,7 +180,7 @@ void ADC_GlobalInit(void)
 	ADC0->ADC_CR1 = 0;
     ISR_SetHandler(ADC0_IRQn, ADC_IrqHandle, NULL);
 #ifdef __BUILD_OS___
-	ISR_SetPriority(ADC0_IRQn, configLIBRARY_LOWEST_INTERRUPT_PRIORITY - 1);
+	ISR_SetPriority(ADC0_IRQn, IRQ_LOWEST_PRIORITY - 1);
 #else
 	ISR_SetPriority(ADC0_IRQn, 6);
 #endif

+ 1 - 1
bsp/air105/hal/core_dcmi.c

@@ -80,7 +80,7 @@ void DCMI_Setup(uint8_t VsyncLevel, uint8_t HsyncLevel, uint8_t PclkPOL, uint8_t
 	ISR_OnOff(DCMI_IRQn, 0);
 	ISR_SetHandler(DCMI_IRQn, prvDCMI_IrqHandler, NULL);
 #ifdef __BUILD_OS__
-	ISR_SetPriority(DCMI_IRQn, configLIBRARY_LOWEST_INTERRUPT_PRIORITY - 2);
+	ISR_SetPriority(DCMI_IRQn, IRQ_LOWEST_PRIORITY - 2);
 #else
 	ISR_SetPriority(DCMI_IRQn, 5);
 #endif

+ 1 - 1
bsp/air105/hal/core_dma.c

@@ -364,7 +364,7 @@ void DMA_GlobalInit(void)
 {
 	ISR_SetHandler(DMA_IRQn, DMA_IrqHandle, NULL);
 #ifdef __BUILD_OS__
-	ISR_SetPriority(DMA_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 2);
+	ISR_SetPriority(DMA_IRQn, IRQ_MAX_PRIORITY + 2);
 #else
 	ISR_SetPriority(DMA_IRQn, 3);
 #endif

+ 1 - 1
bsp/air105/hal/core_gpio.c

@@ -109,7 +109,7 @@ void GPIO_GlobalInit(CBFuncEx_t Fun)
 		GPIO->INTP_TYPE_STA[i].INTP_TYPE = 0;
 		GPIO->INTP_TYPE_STA[i].INTP_STA = 0xffff;
 #ifdef __BUILD_OS__
-		ISR_SetPriority(prvGPIO_Resource[i].IrqLine, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1);
+		ISR_SetPriority(prvGPIO_Resource[i].IrqLine, IRQ_MAX_PRIORITY + 1);
 #else
 		ISR_SetPriority(prvGPIO_Resource[i].IrqLine, 3);
 #endif

+ 1 - 1
bsp/air105/hal/core_hwtimer.c

@@ -224,7 +224,7 @@ static void __FUNC_IN_RAM__ prvHWTimer_StartOperationQueue(uint8_t HWTimerID, HW
 
 				ISR_SetHandler(prvHWTimer[HWTimerID].IrqLine, prvHWTimer_IrqHandlerEndOperationQueue, HWTimerID);
 #ifdef __BUILD_OS__
-				ISR_SetPriority(prvHWTimer[HWTimerID].IrqLine, configLIBRARY_LOWEST_INTERRUPT_PRIORITY - 1);
+				ISR_SetPriority(prvHWTimer[HWTimerID].IrqLine, IRQ_LOWEST_PRIORITY - 1);
 #else
 				ISR_SetPriority(prvHWTimer[HWTimerID].IrqLine, 6);
 #endif

+ 1 - 1
bsp/air105/hal/core_i2c.c

@@ -217,7 +217,7 @@ void I2C_GlobalInit(void)
     ISR_SetHandler(prvI2C.IrqLine, I2C_IrqHandle, NULL);
 #ifdef __BUILD_OS__
     prvI2C.Sem = OS_MutexCreate();
-	ISR_SetPriority(prvI2C.IrqLine, configLIBRARY_LOWEST_INTERRUPT_PRIORITY - 1);
+	ISR_SetPriority(prvI2C.IrqLine, IRQ_LOWEST_PRIORITY - 1);
 #else
 	ISR_SetPriority(prvI2C.IrqLine, 7);
 #endif

+ 1 - 1
bsp/air105/hal/core_keyboard.c

@@ -80,7 +80,7 @@ void KB_Setup(uint16_t PinConfigMap, uint16_t Debounce, CBFuncEx_t CB, void *pPa
 	KCU->KCU_CTRL1 |= (KCU_CTRL1_KBD_EN|KCU_CTRL1_PUSH_IT|KCU_CTRL1_RELEASE_IT|KCU_CTRL1_OVERRUN_IT);
 	ISR_SetHandler(prvKB.IrqLine, KB_IrqHandle, NULL);
 #ifdef __BUILD_OS__
-	ISR_SetPriority(prvKB.IrqLine, configLIBRARY_LOWEST_INTERRUPT_PRIORITY - 1);
+	ISR_SetPriority(prvKB.IrqLine, IRQ_LOWEST_PRIORITY - 1);
 #else
 	ISR_SetPriority(prvKB.IrqLine, 7);
 #endif

+ 2 - 2
bsp/air105/hal/core_spi.c

@@ -374,7 +374,7 @@ static void HSPI_MasterInit(uint8_t SpiID, uint8_t Mode, uint32_t Speed)
 
 	ISR_SetHandler(prvSPI[SpiID].IrqLine, HSPI_IrqHandle, (uint32_t)SpiID);
 #ifdef __BUILD_OS__
-	ISR_SetPriority(prvSPI[SpiID].IrqLine, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1);
+	ISR_SetPriority(prvSPI[SpiID].IrqLine, IRQ_MAX_PRIORITY + 1);
 #else
 	ISR_SetPriority(prvSPI[SpiID].IrqLine, 3);
 #endif
@@ -428,7 +428,7 @@ void SPI_MasterInit(uint8_t SpiID, uint8_t DataBit, uint8_t Mode, uint32_t Speed
 		SPI->DMARDLR = 0;
 		ISR_SetHandler(prvSPI[SpiID].IrqLine, SPI_IrqHandle, (uint32_t)SpiID);
 #ifdef __BUILD_OS__
-		ISR_SetPriority(prvSPI[SpiID].IrqLine, configLIBRARY_LOWEST_INTERRUPT_PRIORITY - 2);
+		ISR_SetPriority(prvSPI[SpiID].IrqLine, IRQ_LOWEST_PRIORITY - 2);
 #else
 		ISR_SetPriority(prvSPI[SpiID].IrqLine, 5);
 #endif

+ 1 - 1
bsp/air105/hal/core_timer.c

@@ -183,7 +183,7 @@ void Timer_Init(void)
 	ISR_OnOff(SYS_TIMER_IRQ, 0);
 	ISR_SetHandler(SYS_TIMER_IRQ, SystemTimerIrqHandler);
 #ifdef __BUILD_OS__
-	ISR_SetPriority(SYS_TIMER_IRQ, configLIBRARY_LOWEST_INTERRUPT_PRIORITY - 1);
+	ISR_SetPriority(SYS_TIMER_IRQ, IRQ_LOWEST_PRIORITY - 1);
 #else
 	ISR_SetPriority(SYS_TIMER_IRQ, SYS_TIMER_IRQ_LEVEL);
 #endif

+ 1 - 1
bsp/air105/hal/core_uart.c

@@ -202,7 +202,7 @@ void Uart_BaseInit(uint8_t UartID, uint32_t BaudRate, uint8_t IsRxCacheEnable, u
 
     ISR_SetHandler(prvUart[UartID].IrqLine, prvUart_IrqHandle, (void *)UartID);
 #ifdef __BUILD_OS__
-	ISR_SetPriority(prvUart[UartID].IrqLine, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 2);
+	ISR_SetPriority(prvUart[UartID].IrqLine, IRQ_MAX_PRIORITY + 2);
 #else
 	ISR_SetPriority(prvUart[UartID].IrqLine, 5);
 #endif

+ 1 - 1
bsp/air105/hal/core_usb_ll_driver.c

@@ -1495,7 +1495,7 @@ void USB_GlobalInit(void)
 
     ISR_SetHandler(prvUSB.IrqLine, prvUSB_IrqHandle, USB_ID0);
 #ifdef __BUILD_OS__
-	ISR_SetPriority(prvUSB.IrqLine, configLIBRARY_LOWEST_INTERRUPT_PRIORITY);
+	ISR_SetPriority(prvUSB.IrqLine, IRQ_LOWEST_PRIORITY);
 #else
 	ISR_SetPriority(prvUSB.IrqLine, 7);
 #endif

+ 2 - 0
bsp/air105/include/app_inc.h

@@ -61,5 +61,7 @@ typedef long long           int64_t;
 #define zallc OS_Zalloc
 #define reallc OS_Realloc
 #define free OS_Free
+#define IRQ_LOWEST_PRIORITY	configLIBRARY_LOWEST_INTERRUPT_PRIORITY
+#define IRQ_MAX_PRIORITY	configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY
 #endif
 #endif