mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-04 23:17:47 +00:00
24b6f0f296
Signed-off-by: deadprogram <ron@hybridgroup.com>
23 lines
414 B
Go
23 lines
414 B
Go
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)
|
|
}
|