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