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.
microphone.h@21:53c2a598dda1, 2015-12-01 (annotated)
- Committer:
- Oschofield
- Date:
- Tue Dec 01 13:18:49 2015 +0000
- Revision:
- 21:53c2a598dda1
- Parent:
- 6:7c1b80df4de9
added the App.h and app.cpp files to library;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Oschofield | 6:7c1b80df4de9 | 1 | #ifndef _MICROPHONE_H_ |
| Oschofield | 6:7c1b80df4de9 | 2 | #define _MICROPHONE_H_ |
| Oschofield | 6:7c1b80df4de9 | 3 | |
| Oschofield | 6:7c1b80df4de9 | 4 | #include "mbed.h" |
| Oschofield | 6:7c1b80df4de9 | 5 | |
| Oschofield | 6:7c1b80df4de9 | 6 | class Microphone |
| Oschofield | 6:7c1b80df4de9 | 7 | { |
| Oschofield | 6:7c1b80df4de9 | 8 | private: |
| Oschofield | 6:7c1b80df4de9 | 9 | bool isStarted; |
| Oschofield | 6:7c1b80df4de9 | 10 | public: |
| Oschofield | 6:7c1b80df4de9 | 11 | // Constructor. |
| Oschofield | 6:7c1b80df4de9 | 12 | Microphone(); |
| Oschofield | 6:7c1b80df4de9 | 13 | |
| Oschofield | 6:7c1b80df4de9 | 14 | // Begins sampling data from the microphone using timer 3. |
| Oschofield | 6:7c1b80df4de9 | 15 | void start(); |
| Oschofield | 6:7c1b80df4de9 | 16 | |
| Oschofield | 6:7c1b80df4de9 | 17 | // Ends sampling (UNTESTED!) |
| Oschofield | 6:7c1b80df4de9 | 18 | void stop(); |
| Oschofield | 6:7c1b80df4de9 | 19 | |
| Oschofield | 6:7c1b80df4de9 | 20 | // Returns a signed 8-bit integer containing the latest data from the microphone. |
| Oschofield | 6:7c1b80df4de9 | 21 | int8_t read(); |
| Oschofield | 6:7c1b80df4de9 | 22 | }; |
| Oschofield | 6:7c1b80df4de9 | 23 | |
| Oschofield | 6:7c1b80df4de9 | 24 | #endif |
| Oschofield | 6:7c1b80df4de9 | 25 |