LLAP Library for Ciseco wireless products.

Dependents:   Ciseco_LLAP_Test Ciseco_SRF_Shield

Library for Ciseco wireless modules http://shop.ciseco.co.uk/rf-module-range/

Tested with Nucleo F401RE and http://shop.ciseco.co.uk/srf-shield-wireless-transciever-for-all-arduino-type-boards/

LLAPSerial.h

Committer:
SomeRandomBloke
Date:
2014-04-15
Revision:
0:c1b97c30cbc5
Child:
1:8f3ec117823d

File content as of revision 0:c1b97c30cbc5:

// LLAPSerial.h


#ifndef _LLAPSERIAL_h
#define _LLAPSERIAL_h

#include "mbed.h"

class LLAPSerial
{
 private:
    char cMessage[13];      // Raw receive buffer
    
    char* inPtr;
    void processMessage();
    void SerialEvent();
    Serial srf;
    
 public:
    LLAPSerial(PinName txPin, PinName rxPin, char *dID = "--" );

    void sendMessage(char* sToSend);
    void sendMessage(char* sToSend, char* valueToSend);
    void sendInt(char *sToSend, int value);
    void sendIntWithDP(char *sToSend, int value, int decimalPlaces);
    void setDeviceId(char* cId);
    
    char deviceId[2];
    char sMessage[15];      // Received message buffer
    bool bMsgReceived;
};

#endif