Files
drivers/sx128x/errors.go
T
Joel Wetzell 62663c1832 add SPI driver for semtech sx128x chips (#864)
* add SPI driver for semtech sx128x chips

Co-authored-by: Copilot <copilot@github.com>

* handle busy loop better

* switch to time based busy timeout

Co-authored-by: Copilot <copilot@github.com>

* comment functions

* start on using types for function inputs

* use types where applicable and align with datasheet more

Co-authored-by: Copilot <copilot@github.com>

* work on exporting less constants

* only export "actionable" errors

* combine identical constants

* add crude lora rx and tx examples

* change from type aliases to local types

---------

Co-authored-by: Copilot <copilot@github.com>
2026-05-04 09:42:03 -03:00

20 lines
875 B
Go

package sx128x
import "errors"
var (
ErrBusyPinTimeout = errors.New("busy pin timeout")
errDataTooLong = errors.New("data over 256 bytes")
errInvalidSleepConfig = errors.New("invalid sleep config")
errInvalidStandbyConfig = errors.New("invalid standby config")
errFrequencyTooLow = errors.New("frequency below 2.4Ghz")
errFrequencyTooHigh = errors.New("frequency above 2.5Ghz")
errPowerTooLow = errors.New("power level below -18dBm")
errPowerTooHigh = errors.New("power level above 13dBm")
errInvalidPeriodBase = errors.New("invalid period base")
errInvalidPacketType = errors.New("invalid packet type")
errInvalidRegulatorMode = errors.New("invalid regulator mode")
errPayloadLengthTooShort = errors.New("payload length too short")
errPayloadLengthTooLong = errors.New("payload length too long")
)