2009:USB Mouse Driver

From 1511Wookiee
Revision as of 19:50, 30 December 2009 by Heydowns (talk | contribs) (USB Mouse Driver moved to 2009:USB Mouse Driver)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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