JIAWEI ZHANG / Mbed 2 deprecated ele350ku

Dependencies:   mbed

Dependents:   Exercise8_1-2-3

Fork of ele350 by JIAWEI ZHANG

Committer:
GGHHHH
Date:
Fri Dec 18 16:27:23 2015 +0000
Revision:
54:aee1b44e62ec
Parent:
39:ab2557044815
h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
GGHHHH 29:8ec9451b1a59 1 #ifndef _SINE_APP_H_
GGHHHH 29:8ec9451b1a59 2 #define _SINE_APP_H_
GGHHHH 29:8ec9451b1a59 3 #include "app.h"
GGHHHH 29:8ec9451b1a59 4 #include "mbed.h"
GGHHHH 29:8ec9451b1a59 5
GGHHHH 54:aee1b44e62ec 6 class SineApp : public App //Class containing the Sine app.//
GGHHHH 29:8ec9451b1a59 7 {
GGHHHH 29:8ec9451b1a59 8 protected:
GGHHHH 29:8ec9451b1a59 9 AnalogOut* analogOut;
GGHHHH 29:8ec9451b1a59 10 Timer timer;
GGHHHH 54:aee1b44e62ec 11 float amplitude; //Define the float amplitude value.//
GGHHHH 54:aee1b44e62ec 12 float frequence; //Define the float frequence value.//
GGHHHH 34:498a218cf53e 13
GGHHHH 29:8ec9451b1a59 14 public:
GGHHHH 54:aee1b44e62ec 15 SineApp(Serial* serialPort); //Constructor.//
GGHHHH 29:8ec9451b1a59 16
GGHHHH 54:aee1b44e62ec 17 virtual void start(); //(Overriden) called when app starts.//
GGHHHH 54:aee1b44e62ec 18 virtual void run(); //(Overriden) called repeatedly while running and do the sine expression.//
GGHHHH 54:aee1b44e62ec 19 virtual void stop(); //(Overriden) called when app stops.//
GGHHHH 54:aee1b44e62ec 20 void setamplitude (float newamplitude); //(Overriden) called when app starts, set the new amplitude.//
GGHHHH 54:aee1b44e62ec 21 void setfrequence (float newfrequence); //(Overriden) called when app starts, set the new frequence.//
GGHHHH 29:8ec9451b1a59 22 };
GGHHHH 29:8ec9451b1a59 23
GGHHHH 29:8ec9451b1a59 24 #endif