yajuan yue / Mbed 2 deprecated ele350

Dependencies:   mbed

Fork of ele350 by JIAWEI ZHANG

Committer:
GGHHHH
Date:
Thu Nov 05 12:01:26 2015 +0000
Revision:
3:1ad50b4e51a6
ku

Who changed what in which revision?

UserRevisionLine numberNew contents of line
GGHHHH 3:1ad50b4e51a6 1 #ifndef _MICROPHONE_H_
GGHHHH 3:1ad50b4e51a6 2 #define _MICROPHONE_H_
GGHHHH 3:1ad50b4e51a6 3
GGHHHH 3:1ad50b4e51a6 4 #include "mbed.h"
GGHHHH 3:1ad50b4e51a6 5
GGHHHH 3:1ad50b4e51a6 6 class Microphone
GGHHHH 3:1ad50b4e51a6 7 {
GGHHHH 3:1ad50b4e51a6 8 private:
GGHHHH 3:1ad50b4e51a6 9 bool isStarted;
GGHHHH 3:1ad50b4e51a6 10 public:
GGHHHH 3:1ad50b4e51a6 11 // Constructor.
GGHHHH 3:1ad50b4e51a6 12 Microphone();
GGHHHH 3:1ad50b4e51a6 13
GGHHHH 3:1ad50b4e51a6 14 // Begins sampling data from the microphone using timer 3.
GGHHHH 3:1ad50b4e51a6 15 void start();
GGHHHH 3:1ad50b4e51a6 16
GGHHHH 3:1ad50b4e51a6 17 // Ends sampling (UNTESTED!)
GGHHHH 3:1ad50b4e51a6 18 void stop();
GGHHHH 3:1ad50b4e51a6 19
GGHHHH 3:1ad50b4e51a6 20 // Returns a signed 8-bit integer containing the latest data from the microphone.
GGHHHH 3:1ad50b4e51a6 21 int8_t read();
GGHHHH 3:1ad50b4e51a6 22 };
GGHHHH 3:1ad50b4e51a6 23
GGHHHH 3:1ad50b4e51a6 24 #endif
GGHHHH 3:1ad50b4e51a6 25