lora: created shared RadioEvent

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram
2022-12-26 00:46:49 +01:00
committed by Ron Evans
parent 2005d7d483
commit 6d51370512
4 changed files with 68 additions and 72 deletions
+23
View File
@@ -0,0 +1,23 @@
package lora
const (
RadioEventRxDone = iota
RadioEventTxDone
RadioEventTimeout
RadioEventWatchdog
RadioEventCrcError
RadioEventUnhandled
)
// RadioEvent are used for communicating in the radio Event Channel
type RadioEvent struct {
EventType int
IRQStatus uint16
EventData []byte
}
// NewRadioEvent() returns a new RadioEvent that can be used in the RadioChannel
func NewRadioEvent(eType int, irqStatus uint16, eData []byte) RadioEvent {
r := RadioEvent{EventType: eType, IRQStatus: irqStatus, EventData: eData}
return r
}