lorawan: Basic implementation of Lorawan Regional Settings and EU868/AU915 regions

This commit is contained in:
Olivier Fauchon
2023-01-12 22:46:04 +01:00
committed by Ron Evans
parent e6cde8f7ae
commit 78cc1afe46
8 changed files with 125 additions and 14 deletions
+22
View File
@@ -0,0 +1,22 @@
package region
import "tinygo.org/x/drivers/lora"
type RegionSettingsAU915 struct {
}
func AU915() *RegionSettingsAU915 {
return &RegionSettingsAU915{}
}
func (r *RegionSettingsAU915) GetJoinRequestChannel() Channel {
return Channel{916800000, lora.Bandwidth_125_0, lora.SpreadingFactor9, lora.CodingRate4_5}
}
func (r *RegionSettingsAU915) GetJoinAcceptChannel() Channel {
return Channel{923300000, lora.Bandwidth_500_0, lora.SpreadingFactor9, lora.CodingRate4_5}
}
func (r *RegionSettingsAU915) GetUplinkChannel() Channel {
return Channel{868500000, lora.Bandwidth_125_0, lora.SpreadingFactor9, lora.CodingRate4_5}
}