mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-15 20:33:39 +00:00
Lorawan uplink support and new lorawan 'basic-demo' example
This commit is contained in:
committed by
Ron Evans
parent
301e6bc35b
commit
889536f7f0
+11
-1
@@ -71,7 +71,17 @@ func Join(otaa *Otaa, session *Session) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func SendUplink() error {
|
||||
func SendUplink(data []uint8, session *Session) error {
|
||||
payload, err := session.GenMessage(0, []byte(data))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ActiveRadio.SetCrc(true)
|
||||
ActiveRadio.SetIqMode(0) // IQ Standard
|
||||
ActiveRadio.Tx(payload, LORA_RXTX_TIMEOUT)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user