SDK  23.9.2
For IoT System Software Development
Public Member Functions | Protected Member Functions | List of all members
SX1272Chip Class Reference

저전력 LoRaTM 및 FSK 무선 통신을 지원하는 Semtech의 SX1272 More...

#include <SX1272Chip.hpp>

Inheritance diagram for SX1272Chip:
SX127xChip LoRaRadioChip PacketRadioChip

Public Member Functions

 SX1272Chip (SPI &s, int8_t pinReset, int8_t pinCs, int8_t pinRxTx, int8_t pinDio0, int8_t pinDio1, int8_t pinDio2, int8_t pinDio3, int8_t pinDio4)
 
error_t begin (bool useTcxo)
 칩을 시작합니다. More...
 
error_t begin ()
 칩을 시작합니다. More...
 
void setLoRaSymbolTimeout (uint16_t nSymbols)
 
int16_t getRssi ()
 RSSI를 dB 단위로 읽습니다.
 
void setTxConfig (Radio::Modulation_t modem, int8_t power, uint32_t fdev, uint32_t bandwidth, uint32_t datarate, uint8_t coderate, uint16_t preambleLen, bool fixLen, bool crcOn, bool freqHopOn, uint8_t hopPeriod, bool iqInverted, uint32_t timeout) override
 
void setRxConfig (Radio::Modulation_t modem, uint32_t bandwidth, uint32_t datarate, uint8_t coderate, uint32_t bandwidthAfc, uint16_t preambleLen, uint16_t symbTimeout, bool fixLen, uint8_t payloadLen, bool crcOn, bool freqHopOn, uint8_t hopPeriod, bool iqInverted, bool rxContinuous) override
 
- Public Member Functions inherited from SX127xChip
 SX127xChip (SPI &s, int8_t pinRxTx, int8_t pinReset, int8_t pinCs, int8_t pinDio0, int8_t pinDio1, int8_t pinDio2, int8_t pinDio3, int8_t pinDio4)
 
error_t readFrame (RadioPacket *frame)
 수신 버퍼에서 프레임을 읽습니다. More...
 
bool bufferIsEmpty ()
 
void flushBuffer ()
 
virtual void sleep ()
 
virtual void wakeup ()
 
error_t transmit (RadioPacket *frame)
 
bool cca () override
 채널이 혼잡한지 아닌지 검사합니다. More...
 
void setTxPower (int8_t dBm)
 송신 출력을 설정합니다. More...
 
int8_t getTxPower ()
 현재 설정된 송신 출력을 반환합니다. More...
 
void setChannel (uint32_t channel) override
 Sets the channels configuration. More...
 
uint32_t getChannel ()
 Gets the channels configuration. More...
 
void setPublicNetwork (bool) override
 Syncword를 설정합니다. More...
 
void setSyncword (uint8_t syncword)
 
void doCAD (void(*func)(LoRaRadioChip &, bool)) override
 CAD (Carrier Activity Detection) 검사를 수행합니다. (LoRa 전용) More...
 
void setIQMode (bool normal)
 LoRa I&Q 신호 모드를 설정합니다. More...
 
void transmitCW () override
 Continuous Wave (CW) 신호를 송출합니다. (LoRa 전용)
 
void transmitCW (bool enable)
 
void setOcp (bool enable, uint8_t iMax)
 Overload Current Protection (OCP) 설정을 합니다. More...
 
void setStandby () override
 
State_t getStatus () override
 
- Public Member Functions inherited from LoRaRadioChip
virtual void setRadio (Radio::LoRaSF_t sf, Radio::LoRaBW_t bw, Radio::LoRaCR_t cr, bool crcOn=true, bool iqInverted=false, uint16_t symbTimeout=0, uint16_t preambleLen=8, uint8_t payloadLen=0, bool freqHopOn=false, uint8_t hopPeriod=0)
 
virtual void setRadio (uint32_t datarate, uint32_t bandwidth, uint32_t bandwidthAfc, uint32_t fDev, bool crcOn=true, uint16_t symbTimeout=0, uint16_t preambleLen=5, uint8_t payloadLen=0)
 
uint32_t getTimeOnAir (uint8_t payloadLen)
 
void setFreqOffset (int32_t offsetHz)
 중심 주파수 오차를 제거하기 위한 offset을 설정합니다. More...
 
int32_t getFreqOffset ()
 중심 주파수 오차를 제거하기 위한 offset을 가져옵니다.
 
- Public Member Functions inherited from PacketRadioChip
void setCcaThreshold (int16_t dBthreshold)
 

Protected Member Functions

void configureTxPower (int8_t dBm)
 
void configureCodingRate (Radio::LoRaCR_t coderate)
 
void dio0Interrupt (GPIOInterruptInfo_t &)
 
- Protected Member Functions inherited from SX127xChip
virtual void reset ()
 
virtual void select ()
 
virtual void deselect ()
 
virtual void setAntSwLowPower (bool status)
 
virtual void setAntSwRx ()
 
virtual void setAntSwTx ()
 
virtual bool usingPaBoost (uint32_t channel)
 
void ccaTask () override
 
void rxTimeout ()
 
void writeBuffer (uint8_t addr, uint8_t *buffer, uint8_t size)
 
void write (uint8_t addr, uint8_t data)
 
void writeFifo (uint8_t *buf, uint8_t size)
 
void readBuffer (uint8_t addr, uint8_t *buffer, uint8_t size)
 
uint8_t read (uint8_t addr)
 
void readFifo (uint8_t *buffer, uint8_t size)
 
void setOpMode (uint8_t opMode)
 
void setTx ()
 
void dio1Interrupt (GPIOInterruptInfo_t &)
 
void dio2Interrupt (GPIOInterruptInfo_t &)
 
void dio3Interrupt (GPIOInterruptInfo_t &)
 
void dio4Interrupt (GPIOInterruptInfo_t &)
 
void setModemFsk ()
 
void setModemLoRa ()
 

Additional Inherited Members

- Public Types inherited from LoRaRadioChip
enum  State_t { RF_IDLE = 0, RF_RX_RUNNING = 1, RF_TX_RUNNING = 2, RF_CAD = 3 }
 
- Static Public Member Functions inherited from LoRaRadioChip
static uint32_t TimeOnAir (Radio::LoRaSF_t, Radio::LoRaBW_t, Radio::LoRaCR_t, uint16_t preambleLen, bool fixLen, uint8_t payloadLen, bool crcOn)
 
static uint32_t TimeOnAir (uint32_t datarate, uint32_t bandwidth, uint16_t preambleLen, bool fixLen, uint8_t payloadLen, bool crcOn)
 
- Public Attributes inherited from LoRaRadioChip
int8_t antennaGain = 0
 Antenna gain을 고려한 송신 출력(EIRP)을 사용하기 위한 antenna gain (단위: dBi)
 
void(* onRxTimeout )(void *, GPIOInterruptInfo_t *) = nullptr
 
void * ctxOnRxTimeout
 
- Public Attributes inherited from PacketRadioChip
void(* onRxStarted )(void *, GPIOInterruptInfo_t *)
 수신이 시작될 때 호출될 콜백함수 포인터 More...
 
void * ctxOnRxStarted
 onRxStarted 가 호출될 때 함께 전달될 context
 
void(* onRxDone )(void *, GPIOInterruptInfo_t *)
 수신이 완료될 때 호출될 콜백함수 포인터 More...
 
void * ctxOnRxDone
 onRxDone 이 호출될 때 함께 전달될 context
 
void(* onTxDone )(void *, bool, GPIOInterruptInfo_t *)
 transmit() 후, 송신이 완료될 때 호출될 콜백함수 포인터 More...
 
void * ctxOnTxDone
 onTxDone 이 호출될 때 함께 전달될 context
 
void(* onChannelBusy )(void *, GPIOInterruptInfo_t *)
 cca() 시 채널이 혼잡할 때 호출될 콜백함수 포인터 More...
 
void * ctxOnChannelBusy
 onChannelBusy 가 호출될 때 함께 전달될 context
 
int16_t dBccaThreshold = -65
 cca() 시 채널이 혼잡하다고 판단하기 위한 에너지 레벨을 설정합니다. (단위: dB, 기본값: -65)
 
- Static Protected Member Functions inherited from SX127xChip
static uint8_t GetFskBandwidthRegValue (uint32_t bandwidth)
 
- Static Protected Member Functions inherited from LoRaRadioChip
static void CCATask (void *)
 
- Protected Attributes inherited from SX127xChip
SPIspi
 
const int8_t pinReset
 
const int8_t pinCs
 
const int8_t pinDio0
 
const int8_t pinDio1
 
const int8_t pinDio2
 
const int8_t pinDio3
 
const int8_t pinDio4
 
const int8_t pinRxTx
 
bool began = false
 
bool rxCrcOk = false
 
Radio::Modulation_t modem
 
State_t state
 
uint32_t channel
 
struct {
   uint8_t   PreambleDetected
 
   uint8_t   SyncWordDetected
 
   uint16_t   NbBytes
 
   RadioPacket *   txFrame
 
   Timer   timeoutTimer
 
   uint16_t   timeoutValue
 
   uint32_t   Bandwidth
 
   uint32_t   Datarate
 
   uint8_t   FixedPayloadLen
 
   bool   CrcOn
 
fskPacketHandler
 
struct {
   int8_t   SnrValue
 
   Radio::LoRaCR_t   CodingRate
 
   Radio::LoRaBW_t   Bandwidth
 
   Radio::LoRaSF_t   Datarate
 
   bool   iqInverted
 
loraPacketHandler
 
uint8_t rxBuffer [RX_BUFFER_SIZE]
 
uint16_t rxPacketSize
 
int16_t rssiValue
 
- Protected Attributes inherited from LoRaRadioChip
struct {
   uint32_t   channel
 
   Radio::Modulation_t   modulation
 
   int8_t   txPower
 
   uint32_t   txTimeout
 
   union {
      struct {
         uint32_t   drHz
 
         uint32_t   bwHz
 
         uint32_t   afcBwHz
 
         uint32_t   fDevHz
 
         uint16_t   symbTimeout
 
         bool   addCrc
 
         uint16_t   preambleLength
 
         uint8_t   fixedPayloadLength
 
      }   FSK
 
      struct {
         Radio::LoRaSF_t   sf
 
         Radio::LoRaCR_t   cr
 
         Radio::LoRaBW_t   bw
 
         uint16_t   preambleLength
 
         uint8_t   fixedPayloadLength
 
         bool   iqInverted
 
         bool   addCrc
 
         uint16_t   symbTimeout
 
      }   LoRa
 
   } 
 
defaultSetting
 
void(* cadCompletedHandler )(LoRaRadioChip &, bool) = nullptr
 
volatile bool inCca = false
 
bool inChannelBusyHandler = false
 
int32_t freqOffset
 

Detailed Description

저전력 LoRaTM 및 FSK 무선 통신을 지원하는 Semtech의 SX1272

Member Function Documentation

◆ begin() [1/2]

error_t SX1272Chip::begin ( )
virtual

칩을 시작합니다.

TCXO를 사용하지 않는다고 가정합니다.

Reimplemented from SX127xChip.

◆ begin() [2/2]

error_t SX1272Chip::begin ( bool  useTcxo)

칩을 시작합니다.

Parameters
useTcxo칩이 TCXO를 사용한다면 true, 아니면 false.

The documentation for this class was generated from the following file: