EasyVR3_LED_Library

Committer:
Xiaofei
Date:
Thu Oct 22 21:12:06 2015 +0000
Revision:
8:eea5cae84e5d
Parent:
7:a080862cf9bd
Child:
9:48b0f2d9c506
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Xiaofei 0:8ec860bd579a 1 #pragma once
Xiaofei 0:8ec860bd579a 2 #include "mbed.h"
Xiaofei 0:8ec860bd579a 3 #include "protocol.h"
Xiaofei 3:05cef12c147a 4
Xiaofei 8:eea5cae84e5d 5 /** My HelloWorld class.
Xiaofei 3:05cef12c147a 6 * Used for printing "Hello World" on USB serial.
Xiaofei 8:eea5cae84e5d 7 *
Xiaofei 8:eea5cae84e5d 8 * Example:
Xiaofei 8:eea5cae84e5d 9 * @code
Xiaofei 8:eea5cae84e5d 10 * #include "mbed.h"
Xiaofei 8:eea5cae84e5d 11 * #include "HelloWorld.h"
Xiaofei 8:eea5cae84e5d 12 *
Xiaofei 8:eea5cae84e5d 13 * HelloWorld hw();
Xiaofei 8:eea5cae84e5d 14 *
Xiaofei 8:eea5cae84e5d 15 * int main() {
Xiaofei 8:eea5cae84e5d 16 * hw.printIt(2);
Xiaofei 8:eea5cae84e5d 17 * }
Xiaofei 8:eea5cae84e5d 18 * @endcode
Xiaofei 3:05cef12c147a 19 */
Xiaofei 0:8ec860bd579a 20 class EasyVR
Xiaofei 0:8ec860bd579a 21 {
Xiaofei 0:8ec860bd579a 22 public:
Xiaofei 1:8b8bb6ac9d11 23 /** EasyVR use Serial communication*/
Xiaofei 1:8b8bb6ac9d11 24 EasyVR(PinName tx,PinName rx);
Xiaofei 1:8b8bb6ac9d11 25 ~EasyVR();
Xiaofei 1:8b8bb6ac9d11 26
Xiaofei 1:8b8bb6ac9d11 27 /** Send a command to EasyVR to excute EasyVR build in routine*/
Xiaofei 1:8b8bb6ac9d11 28 void sendCmd(uint8_t);
Xiaofei 0:8ec860bd579a 29
Xiaofei 1:8b8bb6ac9d11 30 /** Send a argument for the routine */
Xiaofei 1:8b8bb6ac9d11 31 void sendArg(int8_t);
Xiaofei 0:8ec860bd579a 32
Xiaofei 1:8b8bb6ac9d11 33 /** Receive return value from EasyVR routine */
Xiaofei 1:8b8bb6ac9d11 34 int8_t recv(int8_t timeOut = 1);
Xiaofei 1:8b8bb6ac9d11 35
Xiaofei 1:8b8bb6ac9d11 36 /** Decrypt returned value from EasyVR */
Xiaofei 1:8b8bb6ac9d11 37 void decrypt(char*);
Xiaofei 0:8ec860bd579a 38
Xiaofei 1:8b8bb6ac9d11 39 /** Used for awake EasyVR, default time out value to 100*/
Xiaofei 1:8b8bb6ac9d11 40 bool awake(int timeOut = 100);
Xiaofei 0:8ec860bd579a 41
Xiaofei 0:8ec860bd579a 42
Xiaofei 0:8ec860bd579a 43 private:
Xiaofei 0:8ec860bd579a 44 Serial _easyVR;
Xiaofei 0:8ec860bd579a 45 };