mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-08 08:53:40 +00:00
8cfe5ebc4a
Signed-off-by: deadprogram <ron@hybridgroup.com>
23 lines
446 B
Go
23 lines
446 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
)
|
|
|
|
var (
|
|
errRadioNotFound = errors.New("radio not found")
|
|
errRxTimeout = errors.New("radio RX timeout")
|
|
)
|
|
|
|
type LoraRadio interface {
|
|
Reset()
|
|
LoraTx(pkt []uint8, timeoutMs uint32) error
|
|
LoraRx(timeoutMs uint32) ([]uint8, error)
|
|
SetLoraFrequency(freq uint32)
|
|
SetLoraIqMode(mode uint8)
|
|
SetLoraCodingRate(cr uint8)
|
|
SetLoraBandwidth(bw uint8)
|
|
SetLoraCrc(enable bool)
|
|
SetLoraSpreadingFactor(sf uint8)
|
|
}
|