Example software for a Cyclic Executive
Dependencies: MCP23017 SDFileSystem WattBob_TextLCD mbed
Diff: Tasks.h
- Revision:
- 4:b85bc0d810e1
- Parent:
- 3:c611b9bb5770
- Child:
- 5:250f51c80ac1
--- a/Tasks.h Wed Feb 17 10:22:50 2016 +0000 +++ b/Tasks.h Fri Feb 26 10:36:23 2016 +0000 @@ -1,20 +1,26 @@ -/* ############################################################################### -# -# -# -# -# -# -# -# -# -# -# -# -# -# -# -############################################################################### */ +/* ##################################################################### + Tasks.h + ------- + + Embedded Software - Assignment 2 + -------------------------------- + + Written by: Steven Kay + + Date: February 2016 + + Function: This + + Version: 1.0 + + Version History + --------------- + + 1.1 rgdfgdfgdfggdfgdg + + 1.0 gdgddfdddgd + + ##################################################################### */ #ifndef _TASKS_H_ #define _TASKS_H_ @@ -34,7 +40,7 @@ // Task 3 definitions // Task 4 definitions -#define NUM_ANALOG_SAMPLES 4 +#define NUM_ANALOG_SAMPLES 4.0 // Task 5 definitions @@ -49,10 +55,17 @@ { public: Task1(PinName squareWaveInPin); - int MeasureFreq(); + int ReadFrequency(); private: - DigitalIn *_squareWaveIn; + Timer _Task1Timer; + + void MeasureFrequency(); + void StopCounter(); + + volatile int measuredFrequency; + + InterruptIn *_squareWaveIn; };