Home |
RTKernel-32 Programming Manual Function RTInstallSharedIRQHandlerEx Function RTInstallSharedIRQHandler Function RTRemoveSharedIRQHandlerEx Function RTRemoveSharedIRQHandler Function RTKRestoreIRQHandlerFar Function RTKIRQTopPriority |
Function RTKIRQTopPriorityUsing function RTKIRQTopPriority, the interrupt controller's interrupt priorities can be reprogrammed. This call is only supported on systems with two Intel 8259A or compatible interrupt controllers and a target running in PIC (as opposed to APIC) mode. void RTKIRQTopPriority(int Master, int Slave); ParametersMasterSpecifies the IRQ to have the highest priority for the master interrupt controller (0..7). SlaveSpecifies the IRQ to have the highest priority for the slave interrupt controller (8..15). Normally, IRQ 0 (Timer) has the highest priority, IRQ 1 (keyboard) the second highest, etc. The interrupt controller supports only the cyclic rotation of the priorities. Using RTKIRQTopPriority, you can determine which IRQ should have the highest priority for the respective interrupt controller. The other priorities then follow from the cyclic shift. Note that the slave interrupt controller is connected to the master via IRQ 2. Thus, all slave IRQs are handled by the master with the priority of IRQ 2. The default corresponds to the call RTKIRQTopPriority(0, 8); Below, the table on the left shows the respective interrupt priorities (low interrupt priorities mean high urgency). The table on the right shows, as an example, the priorities after calling RTKIRQTopPriority(3, 10):
RTKIRQTopPriority(0, 8) and RTKIRQTopPriority(3, 10)
|