A retro gaming programme, designed for use on a portable embedded system. Incorporates power saving techniques.

Dependencies:   ConfigFile N5110 PowerControl beep mbed

Files at this revision

API Documentation at this revision

Comitter:
el13drt
Date:
Wed May 06 00:18:31 2015 +0000
Parent:
62:827cda7a2663
Child:
64:715fb5a1e58b
Commit message:
pre ninja shift;

Changed in this revision

tower.h Show annotated file Show diff for this revision Revisions of this file
--- a/tower.h	Tue May 05 22:24:35 2015 +0000
+++ b/tower.h	Wed May 06 00:18:31 2015 +0000
@@ -13,74 +13,86 @@
 
 /**
 @namespace lcd
+@brief Object of the N5110 class, allocates pins to the LCD screen
+       (VCC, SCE, RST, D/C, MOSI, SCLK, LED).
 */
 N5110 lcd(p7,p8,p9,p10,p11,p13,p22);//VCC, SCE, RST, D/C, MOSI, SCLK, LED - assign pins for LCD.
 
 /**
-@namespace local
+@namespace cfg
+@brief Object of the ConfigFile, used to create read/write file path within the Mbeds flash memory.
 */
-LocalFileSystem local("local");
 ConfigFile cfg;
 
 /**
-@namespace serial.
+@namespace serial
+@brief Serial port out - Generic protocol used to send and receive data, used for debugging.
 */
 Serial serial(USBTX, USBRX);
 
 /**  
-@namespace timerA.
-@brief timerA - the function timerExpiredA every 0.1 sec.
+@namespace timerA
+@brief Calls the function, timerExpiredA(); at intervals of 0.1 sec.
 */
 Ticker timerA;//for buttonA
 
 /**
-@namespace timerB.
-@parameter Calls the function timerExpiredB every 0.1 sec.
+@namespace timerB
+@brief Calls the function, timerExpiredB(); at intervals of 0.1 sec.
 */
 Ticker timerB;//for buttonB
 
 /**
-@namespace pollJoystick.
+@namespace pollJoystick
+@brief Calls the function, updateJoystick(); at intervals of 1/10 seconds.
 */
 Ticker pollJoystick;
 
 /**
-@namespace buzzer.
+@namespace buzzer
+@brief Object of the beep class, allocates a pin to the Piezo buzzer.
 */
 Beep buzzer(p21);
 
 /**  
 @namespace buttonA
+@brief Object of DigitalIn, allocates a pin to push button A.
 */
 DigitalIn buttonA(p20);
 
 /**  
 @namespace buttonB
+@brief Object of DigitalIn, allocates a pin to push button B.
 */
 DigitalIn buttonB(p19);
 
 /**
 @namespace ledA.
+@brief Object of AnalgOut,allocates a pin to the Action LED.
 */
 AnalogOut ledA(p18);//action LED
 
 /**
 @namespace ledP.
+@brief Object of DigitalOut, allocates a pin to the Power LED.
 */
 DigitalOut ledP(p24);//Power LED
 
 /**
 @namespace joyButton.
+@brief Object of InterruptIn, allocates a pin to the Joy Stick button.
 */
 InterruptIn joyButton(p17);//Interrupt for ISR
 
 /**
 @namespace xpot.
+@brief Objct of AnalogIn, allocates a pin to xPot.
 */
 AnalogIn xPot(p15);//left/right
 
 /**
 @namespace ypot.
+@brief Objct of AnalogIn, allocates a pin to yPot.
 */
 AnalogIn yPot(p16);//up/down
 
@@ -178,61 +190,83 @@
 void refreshCursor2();
 void refreshCursor3();
 void ninjaBoundaries();
+
+/**
+*/
 void ninjaLeft();
+
+/**
+*/
 void ninjaRight();
+
+/**
+*/
 void hazardFall();
+
+/**
+*/
 void newScore();
-
+/**
+*/
 void mainMenu();
+
+/**
+*/
 void exitMenu();
+
+/**
+*/
 void optionsMenu();
+
+/**
+*/
 void game();
+
+/**
+*/
 void difficultyMenu();
+
+/**
+*/
 void soundFXMenu();
+
+/**
+*/
 void scores();
 
 /**
-
 */
 void drawNinja();
 
 /**
-
 */
 void drawHazards();
 
 /**
-
 */
 void drawWelcome();
 
 /**
-
 */
 void drawBackground();
 
 /**
-
 */
 void drawSoundFXMenu();
 
 /**
-
 */
 void drawDifficultyMenu();
 
 /**
-
 */
 void drawMainMenu();
 
 /**
-
 */
 void drawOptionsMenu();
 
 /**
-
 */
 void drawExitMenu();