Patent attributes
A method for dynamically allocating interrupt pins is provided. The present method is used for allocating a plurality of interrupt pins of a control chip. In the present method, a hardware routing table is read first and a plurality of slots that have used the interrupt pins is found out from the hardware routing table. These slots are sorted according to the number of interrupt pins used by each slot. Then, from the slot in the first order of the sequence, the interrupt pins are allocated for a plurality of registers in the control chip corresponding to these slots by turns. The allocation is repeated once the last interrupt pin is allocated until all the registers for the slots are allocated with an interrupt pin.