[SX126x] Added low-level access macro
This commit is contained in:
parent
1a721b3daf
commit
4342be8386
4 changed files with 16 additions and 12 deletions
|
@ -35,7 +35,7 @@ class SX1261 : public SX1262 {
|
||||||
*/
|
*/
|
||||||
int16_t setOutputPower(int8_t power);
|
int16_t setOutputPower(int8_t power);
|
||||||
|
|
||||||
#ifndef RADIOLIB_GODMODE
|
#if !defined(RADIOLIB_GODMODE)
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ class SX1262: public SX126x {
|
||||||
*/
|
*/
|
||||||
int16_t setOutputPower(int8_t power);
|
int16_t setOutputPower(int8_t power);
|
||||||
|
|
||||||
#ifndef RADIOLIB_GODMODE
|
#if !defined(RADIOLIB_GODMODE)
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ class SX1268: public SX126x {
|
||||||
*/
|
*/
|
||||||
int16_t setOutputPower(int8_t power);
|
int16_t setOutputPower(int8_t power);
|
||||||
|
|
||||||
#ifndef RADIOLIB_GODMODE
|
#if !defined(RADIOLIB_GODMODE)
|
||||||
private:
|
private:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -928,11 +928,22 @@ class SX126x: public PhysicalLayer {
|
||||||
int16_t fixImplicitTimeout();
|
int16_t fixImplicitTimeout();
|
||||||
int16_t fixInvertedIQ(uint8_t iqConfig);
|
int16_t fixInvertedIQ(uint8_t iqConfig);
|
||||||
|
|
||||||
#ifndef RADIOLIB_GODMODE
|
#if !defined(RADIOLIB_GODMODE) && !defined(RADIOLIB_LOW_LEVEL)
|
||||||
private:
|
protected:
|
||||||
#endif
|
#endif
|
||||||
Module* _mod;
|
Module* _mod;
|
||||||
|
|
||||||
|
// common low-level SPI interface
|
||||||
|
int16_t SPIwriteCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
|
||||||
|
int16_t SPIwriteCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
|
||||||
|
int16_t SPIreadCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
|
||||||
|
int16_t SPIreadCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
|
||||||
|
int16_t SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes, bool waitForBusy, uint32_t timeout = 5000);
|
||||||
|
|
||||||
|
#if !defined(RADIOLIB_GODMODE)
|
||||||
|
protected:
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t _bw = 0, _sf = 0, _cr = 0, _ldro = 0, _crcType = 0, _headerType = 0;
|
uint8_t _bw = 0, _sf = 0, _cr = 0, _ldro = 0, _crcType = 0, _headerType = 0;
|
||||||
uint16_t _preambleLength = 0;
|
uint16_t _preambleLength = 0;
|
||||||
float _bwKhz = 0;
|
float _bwKhz = 0;
|
||||||
|
@ -950,13 +961,6 @@ class SX126x: public PhysicalLayer {
|
||||||
size_t _implicitLen = 0;
|
size_t _implicitLen = 0;
|
||||||
|
|
||||||
int16_t config(uint8_t modem);
|
int16_t config(uint8_t modem);
|
||||||
|
|
||||||
// common low-level SPI interface
|
|
||||||
int16_t SPIwriteCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
|
|
||||||
int16_t SPIwriteCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
|
|
||||||
int16_t SPIreadCommand(uint8_t cmd, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
|
|
||||||
int16_t SPIreadCommand(uint8_t* cmd, uint8_t cmdLen, uint8_t* data, uint8_t numBytes, bool waitForBusy = true);
|
|
||||||
int16_t SPItransfer(uint8_t* cmd, uint8_t cmdLen, bool write, uint8_t* dataOut, uint8_t* dataIn, uint8_t numBytes, bool waitForBusy, uint32_t timeout = 5000);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue