Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 0:8b449140caa2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Mon May 23 22:25:40 2016 +0000
@@ -0,0 +1,54 @@
+#include"WANOT.h"
+
+/*
+ * Global variables declarations
+ */
+
+/*!
+ * Radio events function pointer
+ */
+RadioEvents_t RadioEvents;
+SX1276MB1xAS Radio(NULL);
+
+extern SuperSlotStates SuperSlotState;
+
+Timer timer;
+int begin, end;
+
+int main()
+{
+
+ // verify the connection with the board
+ while (Radio.Read(REG_VERSION) == 0x00) {
+ debug("Radio could not be detected!\n\r\r", NULL);
+ wait(1);
+ }
+ debug("WANOT Master Started...\n\r");
+
+ char StoreRead[50];
+ GPS_Read(StoreRead);
+
+ SuperSlotInit();
+
+ uint8_t SlaveLocalID = 1;
+
+ while(1) {
+
+ switch(SuperSlotState) {
+ case SetUp_Beacon_Phase:
+ SetUp_Beacon();
+ break;
+
+ case SetUp_Phase:
+ MasterSetUp();
+ break;
+
+ case TDMA_Phase:
+ MasterTDMA(SlaveLocalID);
+ SlaveLocalID++;
+ break;
+
+ }
+ }
+
+}