2009:USB Mouse Driver: Difference between revisions

From 1511Wookiee
Jump to navigationJump to search
(New page: === Driver State Design Notes === State Startup:<br>Look for interrupt<br>Get Interrupt, Start timer -> Startup2<br>No Interrupt -> Startup <br>State Startup2:<br>Wait timer...<b...)
 
 
(No difference)

Latest revision as of 19:50, 30 December 2009

Driver State Design Notes

State Startup:
Look for interrupt
Get Interrupt, Start timer -> Startup2
No Interrupt -> Startup


State Startup2:
Wait timer...
Timer expires
If input = 1: Main1
If input = 0: Startup


State LongMain1:
Start timer
Go main2


LongMain2:
Wait on interrupt
Get interrupt, AND timer time == long period (ie, no movement): ShortMain1
Get interrupt, AND timer time < long period (movement): count++; Go LongMain3

LongMain3
Wait on interrupt
Get interrupt, timer != long period: Startup
Get interrupt, timer == long period: go to ShortMain1


ShortMain1:
Start timer
Go to shortmain2


ShortMain2:
Wait on interrupt
Get interrupt AND timer time == short period (ie, no movement): LongMain1
Get interrupt, AND timer time < short period (movement): count++; Go ShortMain3


ShortMain3
Wait on interrupt
Get interrupt, timer != short period: Startup
Get interrupt, timer == short period: go to LongMain1