You are on page 1of 1

InitJoystickService:

Takes a priority number, returns bool indicating success or failure of posting an Init
event.

Configure A/D subsystem for auto-sampling of pins 4 and 5


Post Init state

PostJoystickService:
Takes an event as parameter, returns service-posting object with priority and event
arguments.

Post the event in question to the service

RunJoystickService:
Takes an event, returns event type

Initialize the joystick timer to 5 ms


When the joystick timer times out,
Read the joystick status for X and Y
If X has been moved from center,
Post this X move event to the display service
If Y has been moved from center,
Post this Y move event to the display service
Reset the joystick timer to 50 ms

You might also like