Loren Geilen / Mbed OS sx126x_simple_TX_shield_2020a

Dependencies:   sx126x

Files at this revision

API Documentation at this revision

Comitter:
lorgei
Date:
Thu Aug 20 23:13:20 2020 +0000
Parent:
2:7232213724ad
Commit message:
Test Commit

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-os.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
--- 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 */
         
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-os.lib	Thu Aug 20 23:13:20 2020 +0000
@@ -0,0 +1,1 @@
+https://github.com/ARMmbed/mbed-os/#3ab72c71b75cb9cb91160a54fba22ec43b036ed2
--- a/mbed.bld	Thu May 14 06:13:31 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-https://mbed.org/users/mbed_official/code/mbed/builds/97feb9bacc10