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: mbed 4DGL-uLCD-SE mbed-rtos nRF24L01P
Microphone.cpp@6:7c72902a735f, 2018-04-18 (annotated)
- Committer:
- Nurchu
- Date:
- Wed Apr 18 15:00:46 2018 +0000
- Revision:
- 6:7c72902a735f
- Parent:
- 2:dc046ff72566
- Child:
- 7:0ac1f1ca8aa6
Added Microphone to uint8_t stub
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Nurchu | 2:dc046ff72566 | 1 | #include "Microphone.h" |
Nurchu | 2:dc046ff72566 | 2 | |
Nurchu | 6:7c72902a735f | 3 | Microphone::Microphone (PinName pin): |
Nurchu | 2:dc046ff72566 | 4 | _pin(pin) |
Nurchu | 2:dc046ff72566 | 5 | {} |
Nurchu | 2:dc046ff72566 | 6 | |
Nurchu | 6:7c72902a735f | 7 | float Microphone::read() |
Nurchu | 2:dc046ff72566 | 8 | { |
Nurchu | 2:dc046ff72566 | 9 | return _pin.read(); |
Nurchu | 2:dc046ff72566 | 10 | } |
Nurchu | 2:dc046ff72566 | 11 | |
Nurchu | 6:7c72902a735f | 12 | inline Microphone::operator float () |
Nurchu | 2:dc046ff72566 | 13 | { |
Nurchu | 2:dc046ff72566 | 14 | return _pin.read(); |
Nurchu | 6:7c72902a735f | 15 | } |
Nurchu | 6:7c72902a735f | 16 | |
Nurchu | 6:7c72902a735f | 17 | uint8_t Microphone::getData() |
Nurchu | 6:7c72902a735f | 18 | { |
Nurchu | 6:7c72902a735f | 19 | return 0; |
Nurchu | 2:dc046ff72566 | 20 | } |