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.
Dependencies: USBDevice mbed-rtos mbed
Fork of JoyStick by
AnalogInFiltered.h@0:33bc88c4ab31, 2013-08-28 (annotated)
- Committer:
- rvt
- Date:
- Wed Aug 28 02:33:03 2013 +0000
- Revision:
- 0:33bc88c4ab31
- Child:
- 1:5b2ab44eb31f
Initial release with RTOS
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rvt | 0:33bc88c4ab31 | 1 | #ifndef ANALOGINFILTERED_H |
| rvt | 0:33bc88c4ab31 | 2 | #define ANALOGINFILTERED_H |
| rvt | 0:33bc88c4ab31 | 3 | |
| rvt | 0:33bc88c4ab31 | 4 | #include "mbed.h" |
| rvt | 0:33bc88c4ab31 | 5 | #include "AnalogFilterInterface.h" |
| rvt | 0:33bc88c4ab31 | 6 | |
| rvt | 0:33bc88c4ab31 | 7 | class AnalogInFiltered { |
| rvt | 0:33bc88c4ab31 | 8 | private: |
| rvt | 0:33bc88c4ab31 | 9 | AnalogIn *_ain; |
| rvt | 0:33bc88c4ab31 | 10 | long _lastValue; |
| rvt | 0:33bc88c4ab31 | 11 | AnalogFilterInterface *_filter; |
| rvt | 0:33bc88c4ab31 | 12 | public: |
| rvt | 0:33bc88c4ab31 | 13 | AnalogInFiltered(AnalogFilterInterface *filter, PinName pin); |
| rvt | 0:33bc88c4ab31 | 14 | ~AnalogInFiltered(); |
| rvt | 0:33bc88c4ab31 | 15 | void measure (); |
| rvt | 0:33bc88c4ab31 | 16 | long getValue(); |
| rvt | 0:33bc88c4ab31 | 17 | bool getIsChanged(int offSet); |
| rvt | 0:33bc88c4ab31 | 18 | }; |
| rvt | 0:33bc88c4ab31 | 19 | |
| rvt | 0:33bc88c4ab31 | 20 | #endif |
