Patent ID: 7953906

Claim:
A method of servicing multiple hardware events in a peripheral device by a processor in a computing device, said method comprising: upon each occurrence of one of said hardware events, recording an event indicator corresponding to said hardware event, and determining an acceptable period before which an interrupt should be generated to service said hardware event; if said acceptable period is smaller than a current value of a timer at said peripheral device, adjusting said timer to a value within said acceptable period; upon expiry of said timer, asserting a first interrupt to said processor; and in response to said first interrupt, executing software code on said processor to: identify a plurality of unserviced hardware events based on said event indicators; identify execution times associated with servicing said plurality of unserviced hardware events; determine a subset of said plurality of unserviced hardware events whose combined execution times take no longer than a predefined time limit; service said subset of said plurality of unserviced hardware events; clear those event indicators corresponding to said subset of said plurality of unserviced hardware events; upon completion of said executing said software code, asserting a further interrupt to said processor if at least one of said event indicators remains set, and in response to said further interrupt, executing said software code on said processor to service unserviced hardware events.