My 2645 project Chenyu Li 200985958

Dependencies:   N5110 mbed

Embed: (wiki syntax)

« Back to documentation index

main.h File Reference

Header file containing functions prototypes, defines and and global variables. More...

Go to the source code of this file.

Data Structures

struct  JoyStick
 struct for Joystick More...

Namespaces

namespace  N5110_lcd
 

VCC,SCE,RST,D/C,MOSI,SCLK,LED.


namespace  buzzer
 

Can also power (VCC) directly from VOUT (3.3 V) - Can give better performance due to current limitation from GPIO pin.


namespace  button
 

set PwmOut out as the buzzer


namespace  buttonjoystick
 

set button as an interrupt in


namespace  xPot
 

connections for joystick


namespace  yPot
 

connections for joystick


Enumerations

enum  DirectionName
 

Serial for debug.

More...

Functions

Serial serial (USBTX, USBRX)
 set 'enermy' as a ticker (not used currently)
void calibrateJoystick ()
 initialize the position of the joystick.
void updateJoystick ()
 read the current joystick value.
void button_isr ()
 return back the button_isr value.

Variables

Ticker pollJoystick
 connections for joystick
Ticker bullet
 timer to regularly read the joystick
Ticker enermy
 set 'bullet' as a ticker (not used currently)
int printFlag = 0
 create struct variable
int enermyFlag = 0
int bulletFlag = 0
int status = 1
bool wall = false
 set the original value of "g_button_flag" equals to 0.

Detailed Description

Header file containing functions prototypes, defines and and global variables.

Shows examples of creating Doxygen documentation. Revision 1.0.

Author:
Chenyu Li(John Lee) SID: 200985958. May 2016

Definition in file main.h.


Enumeration Type Documentation

Serial for debug.

create enumerated type (0,1,2,3 etc. for direction) could be extended for diagonals etc.

Definition at line 65 of file main.h.


Function Documentation

void button_isr (  )

return back the button_isr value.

Definition at line 952 of file main.cpp.

void calibrateJoystick (  )

initialize the position of the joystick.

Definition at line 858 of file main.cpp.

Serial serial ( USBTX  ,
USBRX   
)

set 'enermy' as a ticker (not used currently)

void updateJoystick (  )

read the current joystick value.

Definition at line 865 of file main.cpp.


Variable Documentation

Ticker bullet

timer to regularly read the joystick

Definition at line 57 of file main.h.

int bulletFlag = 0

set the bulletFlag to 0

Definition at line 89 of file main.h.

Ticker enermy

set 'bullet' as a ticker (not used currently)

Definition at line 58 of file main.h.

int enermyFlag = 0

set the enermyFlag to 0

Definition at line 88 of file main.h.

Ticker pollJoystick

connections for joystick

Definition at line 56 of file main.h.

int printFlag = 0

create struct variable

set the printFlag to 0

Definition at line 86 of file main.h.

int status = 1

set the status to 0

Definition at line 108 of file main.h.

bool wall = false

set the original value of "g_button_flag" equals to 0.

set "wall", "hit", "bullethit" as a boolean value.

Definition at line 113 of file main.h.