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.
Fork of SX1276GenericLib by
Diff: sx1276/sx1276-mbed-hal.cpp
- Revision:
- 112:3357f97db844
- Parent:
- 108:3d7cfa8b8519
diff -r ccfb6ca5f5e0 -r 3357f97db844 sx1276/sx1276-mbed-hal.cpp --- a/sx1276/sx1276-mbed-hal.cpp Fri Jun 01 21:37:06 2018 +0000 +++ b/sx1276/sx1276-mbed-hal.cpp Mon Oct 12 21:54:55 2020 +0000 @@ -31,7 +31,7 @@ PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset, PinName dio0, PinName dio1, PinName dio2, PinName dio3, PinName dio4, PinName dio5, PinName antSwitch, PinName antSwitchTX, PinName antSwitchTXBoost, PinName tcxo) - : SX1276( events) + : SX1276( events) // SX1276Generic is a derived class of SX1276 { Sleep_ms( 10 ); this->RadioEvents = events; @@ -60,10 +60,10 @@ default: break; } - _spi = new XSPI(mosi, miso, sclk ); - _nss = new DigitalOut(nss); + _spi = new XSPI(mosi, miso, sclk ); // constructor for SPI pins + _nss = new DigitalOut(nss); // constructor for the ns pin - _reset = new DigitalInOut(reset); + _reset = new DigitalInOut(reset); // constructor for the reset pin _dio0 = NULL; _dio1 = NULL; @@ -157,7 +157,7 @@ { *_nss = 1; _spi->format( 8,0 ); - uint32_t frequencyToSet = 8000000; + uint32_t frequencyToSet = 8000000; // SPI frequency is 8MHz #ifdef TARGET_KL25Z //busclock frequency is halved -> double the spi frequency to compensate _spi->frequency( frequencyToSet * 2 ); #else