MEAM.Design - M4 - Custom Header File


The custom mGeneral.h file provides some useful features specific to the M4 microcontroller board. It also #includes nearly every useful header file for the M4, simplifying programming many of its systems.


The following #defines are included inside the mGeneral header

#define FALSE 0
#define TRUE 1
#define ERROR 0
#define SUCCESS 1
#define OFF 0
#define ON 1
#define TOGGLE 2

To control the on-board LEDs, you can call the following functions:

mGreen(val)
mYellow(val)
mRed(val)
mBlue(val)
mWhite(val)

where 'val' has the possible values: ON, OFF, TOGGLE


As an alternative to using the functions, you can use the following calls to control the on-board LEDs

mGreenON
mGreenOFF
mGreenTOGGLE
mYellowON
mYellowOFF
mYellowTOGGLE
mRedON
mRedOFF
mRedTOGGLE
mBlueON
mBlueOFF
mBlueTOGGLE
mWhiteON
mWhiteOFF
mWhiteTOGGLE