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