Merge pull request #1269 from pkendall64/crsf-max-output
[ExpressLRS.git] / src / test / test_embedded / rx_sx1280_test.cpp
blobbc8595cd64bccdecdfcddddd5047b3b55fd5fd43
1 #include <Arduino.h>
2 #include "targets.h"
3 #include "SX1280Driver.h"
4 #include "ESP8266WiFi.h"
5 #include "FHSS.h"
7 SX1280Driver Radio;
9 uint8_t testdata[8] = {0x80};
11 void ICACHE_RAM_ATTR TXdoneCallback()
13 Serial.println("TXdoneCallback1");
14 //delay(1000);
15 //Radio.TXnb(testdata, sizeof(testdata));
18 void ICACHE_RAM_ATTR RXdoneCallback1()
20 Serial.println("RXdoneCallback");
23 void setup()
25 Serial.begin(115200);
26 Serial.println("Begin SX1280 testing...");
28 Radio.Begin();
29 Radio.Config(SX1280_LORA_BW_0800, SX1280_LORA_SF6, SX1280_LORA_CR_4_7, 2420000000, 12, 8);
30 Radio.TXdoneCallback = &TXdoneCallback;
31 //Radio.TXnb(testdata, sizeof(testdata));
32 Radio.SetFrequencyReg(FHSSfreqs[0]);
33 Radio.RXnb();
36 void loop()
39 //delay(250);
40 //Serial.println("about to TX");
41 //Radio.TXnb(testdata, 8);
43 // Serial.println("about to RX");
44 // Radio.RXnb();
45 // delay(random(50,200));