Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of ele350 by
sine_app.h@39:ab2557044815, 2015-12-17 (annotated)
- Committer:
- GGHHHH
- Date:
- Thu Dec 17 14:12:29 2015 +0000
- Revision:
- 39:ab2557044815
- Parent:
- 34:498a218cf53e
- Child:
- 54:aee1b44e62ec
h
Who changed what in which revision?
User | Revision | Line number | New 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 | 29:8ec9451b1a59 | 6 | class SineApp : public App |
GGHHHH | 29:8ec9451b1a59 | 7 | { |
GGHHHH | 29:8ec9451b1a59 | 8 | protected: |
GGHHHH | 29:8ec9451b1a59 | 9 | AnalogOut* analogOut; |
GGHHHH | 29:8ec9451b1a59 | 10 | Timer timer; |
GGHHHH | 34:498a218cf53e | 11 | float amplitude; |
GGHHHH | 39:ab2557044815 | 12 | float frequence; |
GGHHHH | 34:498a218cf53e | 13 | |
GGHHHH | 29:8ec9451b1a59 | 14 | public: |
GGHHHH | 29:8ec9451b1a59 | 15 | SineApp(Serial* serialPort); |
GGHHHH | 29:8ec9451b1a59 | 16 | |
GGHHHH | 29:8ec9451b1a59 | 17 | virtual void start(); |
GGHHHH | 29:8ec9451b1a59 | 18 | virtual void run(); |
GGHHHH | 29:8ec9451b1a59 | 19 | virtual void stop(); |
GGHHHH | 34:498a218cf53e | 20 | void setamplitude (float newamplitude); |
GGHHHH | 39:ab2557044815 | 21 | void setfrequence (float newfrequence); |
GGHHHH | 29:8ec9451b1a59 | 22 | }; |
GGHHHH | 29:8ec9451b1a59 | 23 | |
GGHHHH | 29:8ec9451b1a59 | 24 | #endif |