mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-21 06:59:00 +00:00
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>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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")
|
||||
)
|
||||
Reference in New Issue
Block a user