EasyVR3_LED_Library

EasyVR.h

Committer:
Xiaofei
Date:
2015-10-22
Revision:
3:05cef12c147a
Parent:
1:8b8bb6ac9d11
Child:
4:ebfb0b26d192

File content as of revision 3:05cef12c147a:

#pragma once
#include "mbed.h"
#include "protocol.h"

/** My HelloWorld class.
 *  Used for printing "Hello World" on USB serial.
 *
 * Example:
 * @code
 * #include "mbed.h"
 * #include "HelloWorld.h"
 *
 * HelloWorld hw();
 * 
 * int main() {
 *     hw.printIt(2);
 * }
 * @endcode
 */
class EasyVR
{
public:
    /** EasyVR use Serial communication*/
    EasyVR(PinName tx,PinName rx);              
    ~EasyVR();                                  
    
    /** Send a command to EasyVR to excute EasyVR build in routine*/
    void sendCmd(uint8_t);             
    
    /** Send a argument for the routine */
    void sendArg(int8_t);                       

    /** Receive return value from EasyVR routine */
    int8_t recv(int8_t timeOut = 1);         
       
    /** Decrypt returned value from EasyVR */
    void decrypt(char*);                        
    
    /** Used for awake EasyVR, default time out value to 100*/
    bool awake(int timeOut = 100);              
    
    
private:
    Serial _easyVR;
};