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.
Dependents: LoRaWAN-SanJose_Bootcamp LoRaWAN-grove-cayenne LoRaWAN-classC-demo LoRaWAN-grove-cayenne ... more
Diff: radio/radio.h
- Revision:
- 8:5a5ea7cc946f
- Parent:
- 7:4b6f960dcca2
--- a/radio/radio.h Fri May 04 11:00:06 2018 -0700
+++ b/radio/radio.h Wed May 23 10:20:07 2018 -0700
@@ -1,5 +1,8 @@
+#include "sx12xx.h"
+#ifdef SX127x_H
#include "sx127x_lora.h"
#include "sx127x_fsk.h"
+#endif /* SX127x_H */
#define RADIO_OSC_STARTUP_us 1000 // [ms]
#define RADIO_SLEEP_TO_RX_us 2000 // [ms]
@@ -116,13 +119,37 @@
);
static LowPowerTimer lpt;
+#ifdef SX127x_H
static SX127x radio;
+#elif defined(SX126x_H)
+ static SX126x radio;
+#endif
private:
- static void LoRaConfig(uint32_t bandwidth, uint8_t datarate, uint8_t coderate, uint16_t preambleLen, bool fixLen, bool crcOn);
+ static void LoRaConfig(
+ uint32_t bandwidth,
+ uint8_t datarate,
+ uint8_t coderate,
+ uint16_t preambleLen,
+ bool fixLen,
+ bool crcOn
+#if defined(SX126x_H)
+ , bool invIQ
+#endif /* SX126x_H */
+ );
+ static void FSKConfig(uint32_t bandwidth, uint32_t datarate, uint32_t fdev, uint32_t preambleLen, bool fixLen, bool crcOn);
static void boardInit(void);
+#ifdef SX127x_H
static SX127x_lora lora;
static SX127x_fsk fsk;
+#endif /* SX127x_H */
+#ifdef SX126x_H
+ static RadioModems_t _m_;
+ static void rx_done(uint8_t, float, float);
+ static void timeout_callback(bool);
+ static void dio1_top_half(void);
+ static PacketParams_t pp;
+#endif /* SX126x_H */
static void rfsw_callback(void);
static void set_tx_dbm(int8_t dbm);
static void ocp(uint8_t ma);
@@ -133,7 +160,6 @@
static void dio1isr(void);
static void dio0UserContext(void);
static void dio1UserContext(void);
-
};