Basic MAC data interface for LoRa transceiver

Dependencies:   L2Frame crc

Dependents:   LoRaBaseStation LoRaTerminal

Revision:
23:4b51a8e27f6a
Parent:
22:2e39f382f782
Child:
24:8f31c33c7675
diff -r 2e39f382f782 -r 4b51a8e27f6a AlohaTransceiver.cpp
--- a/AlohaTransceiver.cpp	Fri Sep 02 03:22:24 2016 +0000
+++ b/AlohaTransceiver.cpp	Fri Sep 02 04:20:26 2016 +0000
@@ -215,7 +215,7 @@
         case LOWPOWER:
         {
             // transmit packet when the radio is free
-            while (AlohaTxQueue.getCounter() > 0)
+            if (AlohaTxQueue.getCounter() > 0)
             {
                 AlohaFrame *frame = AlohaTxQueue.dequeue();
                 
@@ -233,7 +233,6 @@
                 // free memory
                 delete frame;
             }
-            
             break;
         }
         default:
@@ -244,6 +243,11 @@
     }
 }
 
+bool send(BasicPacket *packet)
+{
+    return true;
+}
+
 bool AlohaTransceiver::send(uint8_t *payload, uint8_t payload_length, uint8_t dest_addr)
 {
     // assume the user will not transmit payload longer than 16 bytes