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/

Committer:
SomeRandomBloke
Date:
Tue Apr 15 22:10:17 2014 +0000
Revision:
1:8f3ec117823d
Parent:
0:c1b97c30cbc5
Child:
2:73b87761ce69
updates comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
SomeRandomBloke 1:8f3ec117823d 1 /** LLAPSerial.h
SomeRandomBloke 1:8f3ec117823d 2 *
SomeRandomBloke 1:8f3ec117823d 3 * The MIT License (MIT)
SomeRandomBloke 1:8f3ec117823d 4 *
SomeRandomBloke 1:8f3ec117823d 5 * Copyright (c) 2014 Andrew Lindsay
SomeRandomBloke 1:8f3ec117823d 6 *
SomeRandomBloke 1:8f3ec117823d 7 * Permission is hereby granted, free of charge, to any person obtaining a copy
SomeRandomBloke 1:8f3ec117823d 8 * of this software and associated documentation files (the "Software"), to deal
SomeRandomBloke 1:8f3ec117823d 9 * in the Software without restriction, including without limitation the rights
SomeRandomBloke 1:8f3ec117823d 10 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
SomeRandomBloke 1:8f3ec117823d 11 * copies of the Software, and to permit persons to whom the Software is
SomeRandomBloke 1:8f3ec117823d 12 * furnished to do so, subject to the following conditions:
SomeRandomBloke 1:8f3ec117823d 13 *
SomeRandomBloke 1:8f3ec117823d 14 * The above copyright notice and this permission notice shall be included in
SomeRandomBloke 1:8f3ec117823d 15 * all copies or substantial portions of the Software.
SomeRandomBloke 1:8f3ec117823d 16 *
SomeRandomBloke 1:8f3ec117823d 17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
SomeRandomBloke 1:8f3ec117823d 18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
SomeRandomBloke 1:8f3ec117823d 19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
SomeRandomBloke 1:8f3ec117823d 20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
SomeRandomBloke 1:8f3ec117823d 21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
SomeRandomBloke 1:8f3ec117823d 22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
SomeRandomBloke 1:8f3ec117823d 23 * THE SOFTWARE.
SomeRandomBloke 1:8f3ec117823d 24 */
SomeRandomBloke 0:c1b97c30cbc5 25
SomeRandomBloke 0:c1b97c30cbc5 26 #ifndef _LLAPSERIAL_h
SomeRandomBloke 0:c1b97c30cbc5 27 #define _LLAPSERIAL_h
SomeRandomBloke 0:c1b97c30cbc5 28
SomeRandomBloke 0:c1b97c30cbc5 29 #include "mbed.h"
SomeRandomBloke 0:c1b97c30cbc5 30
SomeRandomBloke 0:c1b97c30cbc5 31 class LLAPSerial
SomeRandomBloke 0:c1b97c30cbc5 32 {
SomeRandomBloke 0:c1b97c30cbc5 33 private:
SomeRandomBloke 0:c1b97c30cbc5 34 char cMessage[13]; // Raw receive buffer
SomeRandomBloke 0:c1b97c30cbc5 35
SomeRandomBloke 0:c1b97c30cbc5 36 char* inPtr;
SomeRandomBloke 0:c1b97c30cbc5 37 void processMessage();
SomeRandomBloke 0:c1b97c30cbc5 38 void SerialEvent();
SomeRandomBloke 0:c1b97c30cbc5 39 Serial srf;
SomeRandomBloke 0:c1b97c30cbc5 40
SomeRandomBloke 0:c1b97c30cbc5 41 public:
SomeRandomBloke 0:c1b97c30cbc5 42 LLAPSerial(PinName txPin, PinName rxPin, char *dID = "--" );
SomeRandomBloke 0:c1b97c30cbc5 43
SomeRandomBloke 0:c1b97c30cbc5 44 void sendMessage(char* sToSend);
SomeRandomBloke 0:c1b97c30cbc5 45 void sendMessage(char* sToSend, char* valueToSend);
SomeRandomBloke 0:c1b97c30cbc5 46 void sendInt(char *sToSend, int value);
SomeRandomBloke 0:c1b97c30cbc5 47 void sendIntWithDP(char *sToSend, int value, int decimalPlaces);
SomeRandomBloke 0:c1b97c30cbc5 48 void setDeviceId(char* cId);
SomeRandomBloke 0:c1b97c30cbc5 49
SomeRandomBloke 0:c1b97c30cbc5 50 char deviceId[2];
SomeRandomBloke 0:c1b97c30cbc5 51 char sMessage[15]; // Received message buffer
SomeRandomBloke 0:c1b97c30cbc5 52 bool bMsgReceived;
SomeRandomBloke 0:c1b97c30cbc5 53 };
SomeRandomBloke 0:c1b97c30cbc5 54
SomeRandomBloke 0:c1b97c30cbc5 55 #endif
SomeRandomBloke 0:c1b97c30cbc5 56