mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-07-26 10:38:41 +00:00
bb2d365868
Co-authored-by: Joost Helberg <joost@helberg.nl>
44 lines
1004 B
Go
44 lines
1004 B
Go
package region
|
|
|
|
import "tinygo.org/x/drivers/lora"
|
|
|
|
const (
|
|
EU868_DEFAULT_PREAMBLE_LEN = 8 // page 103 RP002-1.0.5
|
|
EU868_DEFAULT_TX_POWER_DBM = 16 // page 36 RP002-1.0.5, 16 is the max
|
|
)
|
|
|
|
type ChannelEU struct {
|
|
channel
|
|
}
|
|
|
|
func (c *ChannelEU) Next() bool {
|
|
return false
|
|
}
|
|
|
|
type SettingsEU868 struct {
|
|
settings
|
|
}
|
|
|
|
func EU868() *SettingsEU868 {
|
|
return &SettingsEU868{settings: settings{
|
|
joinRequestChannel: &ChannelEU{channel: channel{lora.MHz_868_1,
|
|
lora.Bandwidth_125_0,
|
|
lora.SpreadingFactor9,
|
|
lora.CodingRate4_7,
|
|
EU868_DEFAULT_PREAMBLE_LEN,
|
|
EU868_DEFAULT_TX_POWER_DBM}},
|
|
joinAcceptChannel: &ChannelEU{channel: channel{lora.MHz_868_1,
|
|
lora.Bandwidth_125_0,
|
|
lora.SpreadingFactor9,
|
|
lora.CodingRate4_7,
|
|
EU868_DEFAULT_PREAMBLE_LEN,
|
|
EU868_DEFAULT_TX_POWER_DBM}},
|
|
uplinkChannel: &ChannelEU{channel: channel{lora.MHz_868_1,
|
|
lora.Bandwidth_125_0,
|
|
lora.SpreadingFactor9,
|
|
lora.CodingRate4_7,
|
|
EU868_DEFAULT_PREAMBLE_LEN,
|
|
EU868_DEFAULT_TX_POWER_DBM}},
|
|
}}
|
|
}
|