First Test Commit

Dependencies:   sx126x

Revision:
3:e28fe0f0c51e
Parent:
2:7232213724ad
--- a/main.cpp	Thu May 14 06:13:31 2020 +0000
+++ b/main.cpp	Thu Aug 20 23:13:20 2020 +0000
@@ -1,4 +1,5 @@
 #include "sx12xx.h"
+#include "mbed.h"
 
 #ifdef TARGET_FF_ARDUINO    /* pins of SX126xDVK1xAS board */
     SPI spi(D11, D12, D13); // mosi, miso, sclk
@@ -11,6 +12,8 @@
     DigitalOut antswPower(D8);
 #endif /* TARGET_FF_ARDUINO */
 
+Serial device(USBTX, USBRX);  // tx, rx
+
 /**********************************************************************/
 volatile bool txDone;
 
@@ -21,6 +24,7 @@
 
 int main()
 {
+    device.baud(57600);
     uint8_t seq = 0;
     
     printf("\r\nreset-tx ");
@@ -41,7 +45,7 @@
     }
 
     if (chipType == CHIP_TYPE_SX1262)
-        radio.set_tx_dbm(true, 0);
+        radio.set_tx_dbm(true, 20);
     else
         radio.set_tx_dbm(false, 14);
 
@@ -67,7 +71,7 @@
     radio.txDone = txDone_callback;
     
     for (;;) {       
-        radio.tx_buf[0] = seq;  /* set payload */
+        radio.tx_buf[200] = seq;  /* set payload */
         txDone = false;
         radio.start_tx(1);   /* begin transmission */