chad
Dependencies: MCP23017 WattBob_TextLCD mbed-rtos mbed
Diff: main.h
- Revision:
- 13:ad04937ca366
- Child:
- 14:ede0e7ed2745
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.h Tue Mar 07 22:32:06 2017 +0000 @@ -0,0 +1,52 @@ +#include "mbed.h" +#include "MCP23017.h" +#include "WattBob_TextLCD.h" +#include "SDFileSystem.h" +#include "rtos.h" + +#define BACK_LIGHT_ON(INTERFACE) INTERFACE->write_bit(1,BL_BIT) +#define BACK_LIGHT_OFF(INTERFACE) INTERFACE->write_bit(0,BL_BIT) + +extern MCP23017 *par_port; // pointer to 16-bit parallel I/O chip +extern WattBob_TextLCD *lcd; // pointer to 2*16 character LCD object +extern FILE *fp; // pointer to uSD object + +extern Timer timer; // Frequency Timer + +void Task1(void); +void Task2(void); +void Task3(void); +void Task4(void); +void Task5(void); +void Task6(void); +void Task7(void); +//void Task8() + + +// Global Variables +// Constant Declaration +extern const int SampFreq; // Sampling Frequency +extern const int WD; // Watchdog pulse length + +// Variable Declaration +extern long int tck; // Used to define what task is called (CycExec) + +extern bool FqIn; // Frequency input boolean +extern int period; // Frequency timer variable (Frequency Check) +extern int freq; // Frequency return variable (Frequency Check) + +extern bool DSIn; // Switch Input boolean +extern int switch_state; + +extern int WD_pulse; + + +extern int A1_in; // Analogue 1 input variable +extern int A2_in; // Analogue 2 input variable +extern int A1_val; // Analogue 1 return variable (Analogue In) +extern int A2_val; // Analogue 2 return variable (Analogue In) + +extern bool DS_sIn; // Shutdown Switch boolean +extern int error_code; // Error code variable + +extern int logcount; // Keep track of log number