Library for using the LSR SiFlex/ProFlex RF modules with mbed.

Files at this revision

API Documentation at this revision

Comitter:
Issus
Date:
Mon Jul 25 22:18:30 2016 +0000
Parent:
5:ae864b96eb5f
Child:
7:25e64602dc61
Commit message:
Added new methods to get data from the module

Changed in this revision

LsrModule.cpp Show annotated file Show diff for this revision Revisions of this file
LsrModule.h Show annotated file Show diff for this revision Revisions of this file
--- a/LsrModule.cpp	Mon Jul 25 18:03:22 2016 +0000
+++ b/LsrModule.cpp	Mon Jul 25 22:18:30 2016 +0000
@@ -753,7 +753,7 @@
 
 /**
 * Sends message type 0x44 (Channel Energy Scan) to the module via UART communication.  This will spark a response message from the module 
-* to the Arduino of type 0xC5.  Subscribing to 0xC5 in your main application will allow you to parse the response 
+* to the host of type 0xC5.  Subscribing to 0xC5 in your main application will allow you to parse the response 
 * data.  See the description for SubscribeRxMsgCallback for more information.
 *
 * Example (Channel 5 for SiFLEX02, Channel 15 for ProFLEX01):
@@ -795,6 +795,19 @@
     }
 }   /*** End ChannelEnergyScanMsg ***/
 
+/**
+* Sends message type 0x51 (Query Host Interface Configuration) to the module via UART communication.  This will spark a 
+* response message from the module to the host of type 0xD1.  Subscribing to 0xD1 in your main application
+* will allow you to parse the response data.  See the description for SubscribeRxMsgCallback for more information.
+*
+*/
+void LsrModule::QueryHostInterfaceConfiguration(void)
+{
+    AddSerialMsgHeader(LSR_MODULE_QUERY_HOST_INTERFACE_CONFIGURATION, 5);
+    AddSerialMsgTrailer();
+}   /*** End QuerySupplyVoltageMsg ***/
+
+
 
 /**
 * Verifies msg type and length.
--- a/LsrModule.h	Mon Jul 25 18:03:22 2016 +0000
+++ b/LsrModule.h	Mon Jul 25 22:18:30 2016 +0000
@@ -83,6 +83,14 @@
 #define LSR_MODULE_SEND_ADVANCED_LONG_RF_DATA_PACKET_MSG_TYPE           0x26
 #define LSR_MODULE_SEND_SIMPLE_REPEATED_RF_DATA_PACKET_MSG_TYPE         0x2A
 #define LSR_MODULE_CHANNEL_ENERGY_SCAN_MSG_TYPE                         0x44
+#define LSR_MODULE_QUERY_HOST_INTERFACE_CONFIGURATION                   0x51
+
+
+/**
+* LSR Module Host RX Message Definitions.
+*
+*/
+#define LSR_MODULE_RESPONSE_HOST_INTERFACE_CONFIGURATION                0xD1
 
 
 /**
@@ -263,7 +271,8 @@
     void SendAdvancedLongAddrRfDataPacketMsg(uint8_t* pu8Data, uint8_t u8DataLength, uint16_t u16DestPanId, uint8_t* pu8DestAddress, uint8_t u8TxOptions, uint8_t u8PacketId);
     // 0x44
     void ChannelEnergyScanMsg(uint16_t u16ChannelMask, uint8_t u8ScanDuration);
-
+    // 0x51
+    void QueryHostInterfaceConfiguration(void);
 
     private:
     // Variables