Skip to content

Asynchronous Transmit and Receive

Choose a tag to compare

@chandrawi chandrawi released this 13 Jan 06:55
· 37 commits to main since this release

Modify transmit and receive process sequence to work asynchronously. IRQ pin connection no longer required to work asynchronously in this version. On the other hand, we should use wait() method before continuing transmit or receive to ensure previous transmit or receive finished.

onTransmit() and onReceive() callback method added to SX126x class. You can immediately call a routine function when a transmit or receive operation done. To using those method, IRQ pin connection required. Example to use callback method added in this version.

Typehinting for all methods added. Default input type for write() method and return type for read() method change to tuple.

SX126x method changes:

  • setSPI() -> Add changing SPI frequency
  • endPacket() -> Add interrupt flag argument
  • request() -> Add interrupt flag argument
  • listen() -> Add interrupt flag argument
  • wait() -> Return false if wait timeout reached and true if otherwise
  • setLoRaModulation() -> input bandwidth change to bandwidth value in Hz and input code rate change to code rate denomination
  • setLoRaPacket() -> input CRC type and invert IQ change to boolean
  • setLoRaPayloadLength() -> deprecated and replaced with setPayloadLength() method
  • setLoRaSyncWord() -> deprecated and replaced with setSyncWord() method
  • flush() -> deprecated and replaced with purge() method

Methods added in SX126x class:

  • setSpreadingFactor()
  • setBandwidth()
  • setCodeRate()
  • setLdroEnable()
  • setHeaderType()
  • setPreambleLength()
  • setCrcEnable()
  • setInvertIq()