Add Imu Magnetometer and persistent memory setting so oxs_configurator
[openXsensor.git] / openXsensor / oXs_lora.h
blobbe72ad637e1819676f78f95dde26a967d4ec01f2
1 #ifndef OXS_LORA_h
2 #define OXS_LORA_h
4 #include "oXs_config_basic.h"
5 #include "oXs_config_macros.h"
7 //#if defined( A_LOCATOR_IS_CONNECTED) && ( A_LOCATOR_IS_CONNECTED == YES)
8 #include "Arduino.h"
10 void initSpi() ; // initialise SPI (with only 1 slave)
11 uint8_t spiSend(uint8_t value);
12 uint8_t loraSingleTransfer(uint8_t reg, uint8_t value) ; // only for internal use; Write and read one LORA register
13 void loraWriteRegister(uint8_t reg, uint8_t value) ; // write a LORA register, discard the read value
14 uint8_t loraReadRegister(uint8_t reg) ; // Read a LORA register; send a dummy value because it is just a read
15 void loraReadRegisterBurst( uint8_t reg, uint8_t* dataIn, uint8_t numBytes) ;
16 void loraWriteRegisterBurst( uint8_t reg, uint8_t* dataOut, uint8_t numBytes) ;
18 void loraHandle() ;
19 void loraSetup() ; // parameters that are set only once
20 void loraTxOn(uint8_t txPower);
21 void loraRxOn() ;
22 void loraInSleep() ;
23 void loraReadPacket() ; // read a packet with 2 bytes ; packetType and TxPower
24 void loraFillTxPacket() ;
28 //#endif
29 #endif