mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-14 11:53:41 +00:00
examples: example with LoRa AT command set implementation
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
var (
|
||||
errRadioNotFound = errors.New("radio not found")
|
||||
errRxTimeout = errors.New("radio RX timeout")
|
||||
)
|
||||
|
||||
type LoraRadio interface {
|
||||
Reset()
|
||||
Tx(pkt []uint8, timeoutMs uint32) error
|
||||
Rx(timeoutMs uint32) ([]uint8, error)
|
||||
SetFrequency(freq uint32)
|
||||
SetIqMode(mode uint8)
|
||||
SetCodingRate(cr uint8)
|
||||
SetBandwidth(bw uint8)
|
||||
SetCrc(enable bool)
|
||||
SetSpreadingFactor(sf uint8)
|
||||
}
|
||||
Reference in New Issue
Block a user