
Completed Snake Program
Dependencies: N5110 PinDetect PowerControl mbed
Fork of DocTest by
main.h@5:1bfc306466db, 2015-04-15 (annotated)
- Committer:
- MBirney
- Date:
- Wed Apr 15 16:34:05 2015 +0000
- Revision:
- 5:1bfc306466db
- Parent:
- 4:551dea241d0a
- Child:
- 6:1de103a19681
Snake eats food !
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
eencae | 0:b85460bc73b9 | 1 | /** |
eencae | 0:b85460bc73b9 | 2 | @file main.h |
eencae | 1:6fc14cd8ccf1 | 3 | @brief Header file containing functions prototypes, defines and global variables. |
MBirney | 2:deb61a34ac31 | 4 | @brief Game of Snake |
eencae | 1:6fc14cd8ccf1 | 5 | @brief Revision 1.0. |
MBirney | 2:deb61a34ac31 | 6 | @author Michael Birney |
MBirney | 2:deb61a34ac31 | 7 | @date April 2015 |
eencae | 0:b85460bc73b9 | 8 | */ |
MBirney | 4:551dea241d0a | 9 | #include "mbed.h" |
eencae | 0:b85460bc73b9 | 10 | |
MBirney | 2:deb61a34ac31 | 11 | /** |
MBirney | 2:deb61a34ac31 | 12 | Displays a Snake Logo Splash Screen |
eencae | 1:6fc14cd8ccf1 | 13 | */ |
MBirney | 2:deb61a34ac31 | 14 | void displaySplash(); |
eencae | 0:b85460bc73b9 | 15 | |
MBirney | 4:551dea241d0a | 16 | /*pin.mode( PullDown ); |
MBirney | 4:551dea241d0a | 17 | pin.attach_asserted( &keyPressed ); |
MBirney | 4:551dea241d0a | 18 | pin.attach_deasserted( &keyReleased ); |
MBirney | 4:551dea241d0a | 19 | pin.attach_asserted_held( &keyPressedHeld ); |
MBirney | 4:551dea241d0a | 20 | pin.attach_deasserted_held( &keyReleasedHeld ); |
MBirney | 4:551dea241d0a | 21 | pin.setSampleFrequency();*/ |
MBirney | 4:551dea241d0a | 22 | |
MBirney | 4:551dea241d0a | 23 | |
MBirney | 4:551dea241d0a | 24 | /* |
MBirney | 4:551dea241d0a | 25 | void keyPressed( void ) { |
MBirney | 4:551dea241d0a | 26 | joystick.direction =DOWN; |
MBirney | 4:551dea241d0a | 27 | led2 = 1; |
MBirney | 4:551dea241d0a | 28 | } |
MBirney | 4:551dea241d0a | 29 | |
MBirney | 4:551dea241d0a | 30 | void keyReleased( void ) { |
MBirney | 4:551dea241d0a | 31 | joystick.direction =UNKNOWN; |
MBirney | 4:551dea241d0a | 32 | led2 = 0; |
MBirney | 4:551dea241d0a | 33 | } |
MBirney | 4:551dea241d0a | 34 | |
MBirney | 4:551dea241d0a | 35 | void keyPressedHeld( void ) { |
MBirney | 4:551dea241d0a | 36 | led2 = 1; |
MBirney | 4:551dea241d0a | 37 | } |
MBirney | 4:551dea241d0a | 38 | |
MBirney | 4:551dea241d0a | 39 | void keyReleasedHeld( void) { |
MBirney | 4:551dea241d0a | 40 | }*/ |