IOAPIC1有16个管脚,GSI base为24,GSI范围为[24,39],依次类推。ACPI要求ISA的16个IRQ应该被identify map到GSI的[0,15]。 IRQ和GSI在APIC系统中常常被混用,实际上对15以上的IRQ,它和GSI相等。我们在谈到IRQ时,一定要注意它所处的语境。 Vector是CPU的概念,是中断在IDT表中的索引。每个IRQ(或GSI)都对应一个...
rt_uint32_tmode,void(*hdr)(void*args),void*args){rt_base_tlevel;rt_int32_tirqindex=-1;if(PIN_PORT(pin)>=PIN_STPORT_MAX){return-RT_ENOSYS;}irqindex=bit2bitno(PIN_STPIN(pin));if(irqindex<0||irqindex>=(rt_int32_t)ITEM_NUM(pin_irq_map)){return-RT_ENOSYS;}level=rt_hw_...
rt_inline const struct pin_irq_map *get_pin_irq_map(uint32_t pinbit) static rt_err_t stm32_pin_attach_irq(struct rt_device *device, rt_int32_t pin, rt_uint32_t mode, void (*hdr)(void *args), void *args) static rt_err_t stm32_pin_dettach_irq(struct rt_device *device, rt...
return&pin_irq_map[mapindex]; }; rt_err_trt_pin_attach_irq(rt_int32_tpin,rt_uint32_tmode,void(*hdr)(void*args),void*args) { rt_base_tlevel; rt_int32_tirqindex =-1; if(PIN_PORT(pin) >= PIN_STPORT_MAX) { return-RT_ENOSYS; } irqindex = bit2bitno(PIN_STPIN(pin)); ...
(pin))) #define __STM32_PORT_MAX 8u #define PIN_STPORT_MAX __STM32_PORT_MAX static const struct pin_irq_map pin_irq_map[] = { {GPIO_PIN_0, EXTI0_IRQn}, {GPIO_PIN_1, EXTI1_IRQn}, {GPIO_PIN_2, EXTI2_IRQn}, {GPIO_PIN_3, EXTI3_IRQn}, {GPIO_PIN_4, EXTI4_IRQn}, ...
1/* 2*引脚中断映射 3*pinbit:如GPIO_PIN_0 4irqno:中断向量号,如EXTI0_IRQn 5*/ 6struct stm32_pin_irq_map 7{ 8 rt_uint16_t pinbit; 9 IRQn_Type irqno; 10}; 11 12/* 13*引脚中断映射列表 14*/ 15static const struct stm32_pin_irq_map stm32_pin_irq_map_tab[] = 16{ 17 {...
irqmap = &pin_irq_map[irqindex]; GPIO_InitTypeDef GPIO_InitStruct;/* Configure GPIO_InitStructure */ GPIO_InitStruct.Pin = PIN_STPIN(pin); @@ -438,6 +437,7 @@ static rt_err_t stm32_pin_irq_enable(struct rt_device *device, rt_base_t pin,...
(rt_uint32_t bit) rt_inline const struct pin_irq_map *get_pin_irq_map(uint32_t pinbit) static rt_err_t stm32_pin_attach_irq(struct rt_device *device, rt_int32_t pin, rt_uint32_t mode, void (*hdr)(void *args), void *args) static rt_err_t stm32_pin_dettach_irq(struct ...
pin_irq_map *get_pin_irq_map(uint32_tpinbit)staticrt_err_tstm32_pin_attach_irq(structrt_device *device,rt_int32_tpin,rt_uint32_tmode,void(*hdr)(void*args),void*args)staticrt_err_tstm32_pin_dettach_irq(structrt_device *device,rt_int32_tpin)staticrt_err_tstm32_pin_irq_enable...
static rt_err_t ra_pin_attach_irq(struct rt_device *device, rt_int32_t pin, static rt_err_t ra_pin_attach_irq(struct rt_device *device, rt_base_t pin, rt_uint32_t mode, void (*hdr)(void *args), void *args) { #ifdef R_ICU_H ...