EasyVR3_LED_Library

Committer:
Xiaofei
Date:
Thu Oct 22 21:14:11 2015 +0000
Revision:
9:48b0f2d9c506
Parent:
8:eea5cae84e5d
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 9:48b0f2d9c506 5 // @author Stephane Rochon
Xiaofei 9:48b0f2d9c506 6
Xiaofei 0:8ec860bd579a 7 class EasyVR
Xiaofei 0:8ec860bd579a 8 {
Xiaofei 0:8ec860bd579a 9 public:
Xiaofei 1:8b8bb6ac9d11 10 /** EasyVR use Serial communication*/
Xiaofei 1:8b8bb6ac9d11 11 EasyVR(PinName tx,PinName rx);
Xiaofei 1:8b8bb6ac9d11 12 ~EasyVR();
Xiaofei 1:8b8bb6ac9d11 13
Xiaofei 1:8b8bb6ac9d11 14 /** Send a command to EasyVR to excute EasyVR build in routine*/
Xiaofei 1:8b8bb6ac9d11 15 void sendCmd(uint8_t);
Xiaofei 0:8ec860bd579a 16
Xiaofei 1:8b8bb6ac9d11 17 /** Send a argument for the routine */
Xiaofei 1:8b8bb6ac9d11 18 void sendArg(int8_t);
Xiaofei 0:8ec860bd579a 19
Xiaofei 1:8b8bb6ac9d11 20 /** Receive return value from EasyVR routine */
Xiaofei 1:8b8bb6ac9d11 21 int8_t recv(int8_t timeOut = 1);
Xiaofei 1:8b8bb6ac9d11 22
Xiaofei 1:8b8bb6ac9d11 23 /** Decrypt returned value from EasyVR */
Xiaofei 1:8b8bb6ac9d11 24 void decrypt(char*);
Xiaofei 0:8ec860bd579a 25
Xiaofei 1:8b8bb6ac9d11 26 /** Used for awake EasyVR, default time out value to 100*/
Xiaofei 1:8b8bb6ac9d11 27 bool awake(int timeOut = 100);
Xiaofei 0:8ec860bd579a 28
Xiaofei 0:8ec860bd579a 29
Xiaofei 0:8ec860bd579a 30 private:
Xiaofei 0:8ec860bd579a 31 Serial _easyVR;
Xiaofei 0:8ec860bd579a 32 };