EasyVR3_LED_Library
EasyVR.h@1:8b8bb6ac9d11, 2015-10-22 (annotated)
- Committer:
- Xiaofei
- Date:
- Thu Oct 22 20:42:05 2015 +0000
- Revision:
- 1:8b8bb6ac9d11
- Parent:
- 0:8ec860bd579a
- Child:
- 3:05cef12c147a
Add comment
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Xiaofei | 0:8ec860bd579a | 1 | #pragma once |
Xiaofei | 0:8ec860bd579a | 2 | #include "mbed.h" |
Xiaofei | 0:8ec860bd579a | 3 | #include "protocol.h" |
Xiaofei | 0:8ec860bd579a | 4 | class EasyVR |
Xiaofei | 0:8ec860bd579a | 5 | { |
Xiaofei | 0:8ec860bd579a | 6 | public: |
Xiaofei | 1:8b8bb6ac9d11 | 7 | /** EasyVR use Serial communication*/ |
Xiaofei | 1:8b8bb6ac9d11 | 8 | EasyVR(PinName tx,PinName rx); |
Xiaofei | 1:8b8bb6ac9d11 | 9 | ~EasyVR(); |
Xiaofei | 1:8b8bb6ac9d11 | 10 | |
Xiaofei | 1:8b8bb6ac9d11 | 11 | /** Send a command to EasyVR to excute EasyVR build in routine*/ |
Xiaofei | 1:8b8bb6ac9d11 | 12 | void sendCmd(uint8_t); |
Xiaofei | 0:8ec860bd579a | 13 | |
Xiaofei | 1:8b8bb6ac9d11 | 14 | /** Send a argument for the routine */ |
Xiaofei | 1:8b8bb6ac9d11 | 15 | void sendArg(int8_t); |
Xiaofei | 0:8ec860bd579a | 16 | |
Xiaofei | 1:8b8bb6ac9d11 | 17 | /** Receive return value from EasyVR routine */ |
Xiaofei | 1:8b8bb6ac9d11 | 18 | int8_t recv(int8_t timeOut = 1); |
Xiaofei | 1:8b8bb6ac9d11 | 19 | |
Xiaofei | 1:8b8bb6ac9d11 | 20 | /** Decrypt returned value from EasyVR */ |
Xiaofei | 1:8b8bb6ac9d11 | 21 | void decrypt(char*); |
Xiaofei | 0:8ec860bd579a | 22 | |
Xiaofei | 1:8b8bb6ac9d11 | 23 | /** Used for awake EasyVR, default time out value to 100*/ |
Xiaofei | 1:8b8bb6ac9d11 | 24 | bool awake(int timeOut = 100); |
Xiaofei | 0:8ec860bd579a | 25 | |
Xiaofei | 0:8ec860bd579a | 26 | |
Xiaofei | 0:8ec860bd579a | 27 | private: |
Xiaofei | 0:8ec860bd579a | 28 | Serial _easyVR; |
Xiaofei | 0:8ec860bd579a | 29 | }; |