tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/lora/lorawan/region/eu868.go (about)

     1  package region
     2  
     3  import "tinygo.org/x/drivers/lora"
     4  
     5  const (
     6  	EU868_DEFAULT_PREAMBLE_LEN = 8
     7  	EU868_DEFAULT_TX_POWER_DBM = 20
     8  )
     9  
    10  type ChannelEU struct {
    11  	channel
    12  }
    13  
    14  func (c *ChannelEU) Next() bool {
    15  	return false
    16  }
    17  
    18  type SettingsEU868 struct {
    19  	settings
    20  }
    21  
    22  func EU868() *SettingsEU868 {
    23  	return &SettingsEU868{settings: settings{
    24  		joinRequestChannel: &ChannelEU{channel: channel{lora.MHz_868_1,
    25  			lora.Bandwidth_125_0,
    26  			lora.SpreadingFactor9,
    27  			lora.CodingRate4_7,
    28  			EU868_DEFAULT_PREAMBLE_LEN,
    29  			EU868_DEFAULT_TX_POWER_DBM}},
    30  		joinAcceptChannel: &ChannelEU{channel: channel{lora.MHz_868_1,
    31  			lora.Bandwidth_125_0,
    32  			lora.SpreadingFactor9,
    33  			lora.CodingRate4_7,
    34  			EU868_DEFAULT_PREAMBLE_LEN,
    35  			EU868_DEFAULT_TX_POWER_DBM}},
    36  		uplinkChannel: &ChannelEU{channel: channel{lora.MHz_868_1,
    37  			lora.Bandwidth_125_0,
    38  			lora.SpreadingFactor9,
    39  			lora.CodingRate4_7,
    40  			EU868_DEFAULT_PREAMBLE_LEN,
    41  			EU868_DEFAULT_TX_POWER_DBM}},
    42  	}}
    43  }