Driver library for SX1272/SX1276 transceivers
Dependents: LORA_RX LORA_TX WindConcentrator hid_test ... more
Driver library for SX1272 and SX1276 radio transceivers.
This device uses CSS modulation to provide much improved link budget. The RF hardware is same as in FSK devices, just with added LoRa spread-spectrum modem.
This library provides functions to configure radio chip and transmit & receive packets.
Using This Library
Library function service_radio()
must be called continuously from main loop, to service interrupts from radio.
Board Specific implementation
FunctionPointer for rf_switch
callback allows the program to implement control of RF switch unique to their board.
Example options are:
- SKY13373 for external power amplifier implementation. Requires two DigitalOut pins.
- SKY13350 using PA_BOOST. requires two DigitalOut pins.
- PE4259-63: controlled directly by radio chip, no software function needed. However, in the case of SX1276MB1xAS, the RXTX pin on IO2 should be driven by this callback function when R16 is installed (without R15) on this shield board.
Some configurations may need to force the use of RFO or PA_BOOST, or a board could offer both options. The rf_switch
function pointer callback should support the implementation choice on the board.
further reading
- LoRa modulation basics (dropbox PDF)
- OpenLoRa forum
Diff: sx127x_fsk.h
- Revision:
- 4:d987ac2836bf
- Parent:
- 3:3bf2515b1eed
- Child:
- 6:5d94ee847016
- Child:
- 9:ae1a71ccd730
--- a/sx127x_fsk.h Fri May 02 01:18:59 2014 +0000 +++ b/sx127x_fsk.h Fri May 02 23:35:30 2014 +0000 @@ -266,6 +266,9 @@ * before SX127x_fsk can be used, eanble() must be called. LoRa mode is unavailable while FSK is in use. */ void enable(void); + /** put FSK modem to some functioning default */ + void init(void); + /** fills radio FIFO with payload contents, prior to transmission * @param len count of bytes to put into FIFO * @note tx_buf[] should contain desired payload (to send) prior to calling @@ -283,6 +286,12 @@ /** bw_hz: single side (ssb) */ void set_rx_dcc_bw_hz(uint32_t bw_hz, char afc); + uint32_t get_bitrate(void); + void set_bitrate(uint32_t); + + uint32_t get_tx_fdev_hz(void); + void set_tx_fdev_hz(uint32_t); + service_action_e service(void); // (SLIH) ISR bottom half RegRxConfig_t RegRxConfig; // 0x0d