Skip to content

Commit 60da4a9

Browse files
authored
Merge branch 'master' into feature/ipaddress-v6-support
2 parents e70240a + 77065bf commit 60da4a9

File tree

4 files changed

+329
-24
lines changed

4 files changed

+329
-24
lines changed

Diff for: boards.txt

+204
Original file line numberDiff line numberDiff line change
@@ -4831,6 +4831,210 @@ nina_w10.menu.EraseFlash.all.upload.erase_cmd=-e
48314831

48324832
##############################################################
48334833

4834+
nora_w10.name=u-blox NORA-W10 series (ESP32-S3)
4835+
nora_w10.vid.0=0x303a
4836+
nora_w10.pid.0=0x1001
4837+
4838+
nora_w10.bootloader.tool=esptool_py
4839+
nora_w10.bootloader.tool.default=esptool_py
4840+
4841+
nora_w10.upload.tool=esptool_py
4842+
nora_w10.upload.tool.default=esptool_py
4843+
nora_w10.upload.tool.network=esp_ota
4844+
4845+
nora_w10.upload.maximum_size=1310720
4846+
nora_w10.upload.maximum_data_size=327680
4847+
nora_w10.upload.flags=
4848+
nora_w10.upload.extra_flags=
4849+
nora_w10.upload.use_1200bps_touch=false
4850+
nora_w10.upload.wait_for_upload_port=false
4851+
4852+
nora_w10.serial.disableDTR=false
4853+
nora_w10.serial.disableRTS=false
4854+
4855+
nora_w10.build.tarch=xtensa
4856+
nora_w10.build.bootloader_addr=0x0
4857+
nora_w10.build.target=esp32s3
4858+
nora_w10.build.mcu=esp32s3
4859+
nora_w10.build.core=esp32
4860+
nora_w10.build.variant=nora_w10
4861+
nora_w10.build.board=UBLOX_NORA_W10
4862+
4863+
nora_w10.build.usb_mode=1
4864+
nora_w10.build.cdc_on_boot=0
4865+
nora_w10.build.msc_on_boot=0
4866+
nora_w10.build.dfu_on_boot=0
4867+
nora_w10.build.f_cpu=240000000L
4868+
nora_w10.build.flash_size=4MB
4869+
nora_w10.build.flash_freq=80m
4870+
nora_w10.build.flash_mode=dio
4871+
nora_w10.build.boot=qio
4872+
nora_w10.build.boot_freq=80m
4873+
nora_w10.build.partitions=default
4874+
nora_w10.build.defines=
4875+
nora_w10.build.loop_core=
4876+
nora_w10.build.event_core=
4877+
nora_w10.build.psram_type=qspi
4878+
nora_w10.build.memory_type={build.boot}_{build.psram_type}
4879+
4880+
nora_w10.menu.PSRAM.disabled=Disabled
4881+
nora_w10.menu.PSRAM.disabled.build.defines=
4882+
nora_w10.menu.PSRAM.disabled.build.psram_type=qspi
4883+
nora_w10.menu.PSRAM.enabled=QSPI PSRAM
4884+
nora_w10.menu.PSRAM.enabled.build.defines=-DBOARD_HAS_PSRAM
4885+
nora_w10.menu.PSRAM.enabled.build.psram_type=qspi
4886+
nora_w10.menu.PSRAM.opi=OPI PSRAM
4887+
nora_w10.menu.PSRAM.opi.build.defines=-DBOARD_HAS_PSRAM
4888+
nora_w10.menu.PSRAM.opi.build.psram_type=opi
4889+
4890+
nora_w10.menu.FlashMode.qio=QIO 80MHz
4891+
nora_w10.menu.FlashMode.qio.build.flash_mode=dio
4892+
nora_w10.menu.FlashMode.qio.build.boot=qio
4893+
nora_w10.menu.FlashMode.qio.build.boot_freq=80m
4894+
nora_w10.menu.FlashMode.qio.build.flash_freq=80m
4895+
nora_w10.menu.FlashMode.qio120=QIO 120MHz
4896+
nora_w10.menu.FlashMode.qio120.build.flash_mode=dio
4897+
nora_w10.menu.FlashMode.qio120.build.boot=qio
4898+
nora_w10.menu.FlashMode.qio120.build.boot_freq=120m
4899+
nora_w10.menu.FlashMode.qio120.build.flash_freq=80m
4900+
nora_w10.menu.FlashMode.dio=DIO 80MHz
4901+
nora_w10.menu.FlashMode.dio.build.flash_mode=dio
4902+
nora_w10.menu.FlashMode.dio.build.boot=dio
4903+
nora_w10.menu.FlashMode.dio.build.boot_freq=80m
4904+
nora_w10.menu.FlashMode.dio.build.flash_freq=80m
4905+
nora_w10.menu.FlashMode.opi=OPI 80MHz
4906+
nora_w10.menu.FlashMode.opi.build.flash_mode=dout
4907+
nora_w10.menu.FlashMode.opi.build.boot=opi
4908+
nora_w10.menu.FlashMode.opi.build.boot_freq=80m
4909+
nora_w10.menu.FlashMode.opi.build.flash_freq=80m
4910+
4911+
nora_w10.menu.FlashSize.4M=4MB (32Mb)
4912+
nora_w10.menu.FlashSize.4M.build.flash_size=4MB
4913+
nora_w10.menu.FlashSize.8M=8MB (64Mb)
4914+
nora_w10.menu.FlashSize.8M.build.flash_size=8MB
4915+
nora_w10.menu.FlashSize.8M.build.partitions=default_8MB
4916+
#nora_w10.menu.FlashSize.16M=16MB (128Mb)
4917+
#nora_w10.menu.FlashSize.16M.build.flash_size=16MB
4918+
#nora_w10.menu.FlashSize.32M=32MB (256Mb)
4919+
#nora_w10.menu.FlashSize.32M.build.flash_size=32MB
4920+
4921+
nora_w10.menu.LoopCore.1=Core 1
4922+
nora_w10.menu.LoopCore.1.build.loop_core=-DARDUINO_RUNNING_CORE=1
4923+
nora_w10.menu.LoopCore.0=Core 0
4924+
nora_w10.menu.LoopCore.0.build.loop_core=-DARDUINO_RUNNING_CORE=0
4925+
4926+
nora_w10.menu.EventsCore.1=Core 1
4927+
nora_w10.menu.EventsCore.1.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=1
4928+
nora_w10.menu.EventsCore.0=Core 0
4929+
nora_w10.menu.EventsCore.0.build.event_core=-DARDUINO_EVENT_RUNNING_CORE=0
4930+
4931+
nora_w10.menu.USBMode.hwcdc=Hardware CDC and JTAG
4932+
nora_w10.menu.USBMode.hwcdc.build.usb_mode=1
4933+
nora_w10.menu.USBMode.default=USB-OTG (TinyUSB)
4934+
nora_w10.menu.USBMode.default.build.usb_mode=0
4935+
4936+
nora_w10.menu.CDCOnBoot.default=Disabled
4937+
nora_w10.menu.CDCOnBoot.default.build.cdc_on_boot=0
4938+
nora_w10.menu.CDCOnBoot.cdc=Enabled
4939+
nora_w10.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
4940+
4941+
nora_w10.menu.MSCOnBoot.default=Disabled
4942+
nora_w10.menu.MSCOnBoot.default.build.msc_on_boot=0
4943+
nora_w10.menu.MSCOnBoot.msc=Enabled (Requires USB-OTG Mode)
4944+
nora_w10.menu.MSCOnBoot.msc.build.msc_on_boot=1
4945+
4946+
nora_w10.menu.DFUOnBoot.default=Disabled
4947+
nora_w10.menu.DFUOnBoot.default.build.dfu_on_boot=0
4948+
nora_w10.menu.DFUOnBoot.dfu=Enabled (Requires USB-OTG Mode)
4949+
nora_w10.menu.DFUOnBoot.dfu.build.dfu_on_boot=1
4950+
4951+
nora_w10.menu.UploadMode.default=UART0 / Hardware CDC
4952+
nora_w10.menu.UploadMode.default.upload.use_1200bps_touch=false
4953+
nora_w10.menu.UploadMode.default.upload.wait_for_upload_port=false
4954+
nora_w10.menu.UploadMode.cdc=USB-OTG CDC (TinyUSB)
4955+
nora_w10.menu.UploadMode.cdc.upload.use_1200bps_touch=true
4956+
nora_w10.menu.UploadMode.cdc.upload.wait_for_upload_port=true
4957+
4958+
nora_w10.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
4959+
nora_w10.menu.PartitionScheme.default.build.partitions=default
4960+
nora_w10.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
4961+
nora_w10.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
4962+
nora_w10.menu.PartitionScheme.default_8MB=8M Flash (3MB APP/1.5MB FAT)
4963+
nora_w10.menu.PartitionScheme.default_8MB.build.partitions=default_8MB
4964+
nora_w10.menu.PartitionScheme.default_8MB.upload.maximum_size=3342336
4965+
nora_w10.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
4966+
nora_w10.menu.PartitionScheme.minimal.build.partitions=minimal
4967+
nora_w10.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
4968+
nora_w10.menu.PartitionScheme.no_ota.build.partitions=no_ota
4969+
nora_w10.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
4970+
nora_w10.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
4971+
nora_w10.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
4972+
nora_w10.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
4973+
nora_w10.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
4974+
nora_w10.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
4975+
nora_w10.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
4976+
nora_w10.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
4977+
nora_w10.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
4978+
nora_w10.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
4979+
nora_w10.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
4980+
nora_w10.menu.PartitionScheme.huge_app.build.partitions=huge_app
4981+
nora_w10.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
4982+
nora_w10.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
4983+
nora_w10.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
4984+
nora_w10.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
4985+
#nora_w10.menu.PartitionScheme.fatflash=16M Flash (2MB APP/12.5MB FAT)
4986+
#nora_w10.menu.PartitionScheme.fatflash.build.partitions=ffat
4987+
#nora_w10.menu.PartitionScheme.fatflash.upload.maximum_size=2097152
4988+
#nora_w10.menu.PartitionScheme.app3M_fat9M_16MB=16M Flash (3MB APP/9MB FATFS)
4989+
#nora_w10.menu.PartitionScheme.app3M_fat9M_16MB.build.partitions=app3M_fat9M_16MB
4990+
#nora_w10.menu.PartitionScheme.app3M_fat9M_16MB.upload.maximum_size=3145728
4991+
nora_w10.menu.PartitionScheme.rainmaker=RainMaker
4992+
nora_w10.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
4993+
nora_w10.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
4994+
4995+
nora_w10.menu.CPUFreq.240=240MHz (WiFi)
4996+
nora_w10.menu.CPUFreq.240.build.f_cpu=240000000L
4997+
nora_w10.menu.CPUFreq.160=160MHz (WiFi)
4998+
nora_w10.menu.CPUFreq.160.build.f_cpu=160000000L
4999+
nora_w10.menu.CPUFreq.80=80MHz (WiFi)
5000+
nora_w10.menu.CPUFreq.80.build.f_cpu=80000000L
5001+
nora_w10.menu.CPUFreq.40=40MHz
5002+
nora_w10.menu.CPUFreq.40.build.f_cpu=40000000L
5003+
nora_w10.menu.CPUFreq.20=20MHz
5004+
nora_w10.menu.CPUFreq.20.build.f_cpu=20000000L
5005+
nora_w10.menu.CPUFreq.10=10MHz
5006+
nora_w10.menu.CPUFreq.10.build.f_cpu=10000000L
5007+
5008+
nora_w10.menu.UploadSpeed.921600=921600
5009+
nora_w10.menu.UploadSpeed.921600.upload.speed=921600
5010+
nora_w10.menu.UploadSpeed.115200=115200
5011+
nora_w10.menu.UploadSpeed.115200.upload.speed=115200
5012+
nora_w10.menu.UploadSpeed.256000.windows=256000
5013+
nora_w10.menu.UploadSpeed.256000.upload.speed=256000
5014+
nora_w10.menu.UploadSpeed.230400.windows.upload.speed=256000
5015+
nora_w10.menu.UploadSpeed.230400=230400
5016+
nora_w10.menu.UploadSpeed.230400.upload.speed=230400
5017+
nora_w10.menu.UploadSpeed.460800.linux=460800
5018+
nora_w10.menu.UploadSpeed.460800.macosx=460800
5019+
nora_w10.menu.UploadSpeed.460800.upload.speed=460800
5020+
nora_w10.menu.UploadSpeed.512000.windows=512000
5021+
nora_w10.menu.UploadSpeed.512000.upload.speed=512000
5022+
5023+
nora_w10.menu.DebugLevel.none=None
5024+
nora_w10.menu.DebugLevel.none.build.code_debug=0
5025+
nora_w10.menu.DebugLevel.error=Error
5026+
nora_w10.menu.DebugLevel.error.build.code_debug=1
5027+
nora_w10.menu.DebugLevel.warn=Warn
5028+
nora_w10.menu.DebugLevel.warn.build.code_debug=2
5029+
nora_w10.menu.DebugLevel.info=Info
5030+
nora_w10.menu.DebugLevel.info.build.code_debug=3
5031+
nora_w10.menu.DebugLevel.debug=Debug
5032+
nora_w10.menu.DebugLevel.debug.build.code_debug=4
5033+
nora_w10.menu.DebugLevel.verbose=Verbose
5034+
nora_w10.menu.DebugLevel.verbose.build.code_debug=5
5035+
5036+
##############################################################
5037+
48345038
widora-air.name=Widora AIR
48355039

48365040
widora-air.bootloader.tool=esptool_py

Diff for: libraries/RainMaker/examples/RMakerSonoffDualR3/RMakerSonoffDualR3.ino

+21-16
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ LightSwitch switch_ch1 = {gpio_switch1, false};
3131
LightSwitch switch_ch2 = {gpio_switch2, false};
3232

3333
//The framework provides some standard device types like switch, lightbulb, fan, temperature sensor.
34-
static Switch my_switch1("Switch_ch1", &gpio_relay1);
35-
static Switch my_switch2("Switch_ch2", &gpio_relay2);
34+
static Switch my_switch1;
35+
static Switch my_switch2;
3636

3737
void sysProvEvent(arduino_event_t *sys_event)
3838
{
39-
switch (sys_event->event_id) {
39+
switch (sys_event->event_id) {
4040
case ARDUINO_EVENT_PROV_START:
4141
#if CONFIG_IDF_TARGET_ESP32
4242
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
4343
printQR(service_name, pop, "ble");
4444
#else
4545
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
4646
printQR(service_name, pop, "softap");
47-
#endif
47+
#endif
4848
break;
4949
case ARDUINO_EVENT_WIFI_STA_CONNECTED:
5050
Serial.printf("\nConnected to Wi-Fi!\n");
@@ -60,18 +60,18 @@ void write_callback(Device *device, Param *param, const param_val_t val, void *p
6060
const char *param_name = param->getParamName();
6161

6262
if(strcmp(device_name, "Switch_ch1") == 0) {
63-
63+
6464
Serial.printf("Lightbulb = %s\n", val.val.b? "true" : "false");
65-
65+
6666
if(strcmp(param_name, "Power") == 0) {
6767
Serial.printf("Received value = %s for %s - %s\n", val.val.b? "true" : "false", device_name, param_name);
6868
switch_state_ch1 = val.val.b;
6969
(switch_state_ch1 == false) ? digitalWrite(gpio_relay1, LOW) : digitalWrite(gpio_relay1, HIGH);
7070
param->updateAndReport(val);
7171
}
72-
72+
7373
} else if(strcmp(device_name, "Switch_ch2") == 0) {
74-
74+
7575
Serial.printf("Switch value = %s\n", val.val.b? "true" : "false");
7676

7777
if(strcmp(param_name, "Power") == 0) {
@@ -80,9 +80,9 @@ void write_callback(Device *device, Param *param, const param_val_t val, void *p
8080
(switch_state_ch2 == false) ? digitalWrite(gpio_relay2, LOW) : digitalWrite(gpio_relay2, HIGH);
8181
param->updateAndReport(val);
8282
}
83-
83+
8484
}
85-
85+
8686
}
8787

8888
void ARDUINO_ISR_ATTR isr(void* arg) {
@@ -92,8 +92,9 @@ void ARDUINO_ISR_ATTR isr(void* arg) {
9292

9393
void setup()
9494
{
95+
9596
uint32_t chipId = 0;
96-
97+
9798
Serial.begin(115200);
9899

99100
// Configure the input GPIOs
@@ -102,7 +103,7 @@ void setup()
102103
attachInterruptArg(switch_ch1.pin, isr, &switch_ch1, CHANGE);
103104
pinMode(switch_ch2.pin, INPUT_PULLUP);
104105
attachInterruptArg(switch_ch2.pin, isr, &switch_ch2, CHANGE);
105-
106+
106107
// Set the Relays GPIOs as output mode
107108
pinMode(gpio_relay1, OUTPUT);
108109
pinMode(gpio_relay2, OUTPUT);
@@ -112,20 +113,24 @@ void setup()
112113
digitalWrite(gpio_relay2, DEFAULT_POWER_MODE);
113114
digitalWrite(gpio_led, false);
114115

115-
Node my_node;
116+
Node my_node;
116117
my_node = RMaker.initNode("Sonoff Dual R3");
117118

119+
//Initialize switch device
120+
my_switch1 = Switch("Switch_ch1", &gpio_relay1);
121+
my_switch2 = Switch("Switch_ch2", &gpio_relay2);
122+
118123
//Standard switch device
119124
my_switch1.addCb(write_callback);
120125
my_switch2.addCb(write_callback);
121126

122-
//Add switch device to the node
127+
//Add switch device to the node
123128
my_node.addDevice(my_switch1);
124129
my_node.addDevice(my_switch2);
125130

126-
//This is optional
131+
//This is optional
127132
RMaker.enableOTA(OTA_USING_PARAMS);
128-
//If you want to enable scheduling, set time zone for your region using setTimeZone().
133+
//If you want to enable scheduling, set time zone for your region using setTimeZone().
129134
//The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html
130135
// RMaker.setTimeZone("Asia/Shanghai");
131136
// Alternatively, enable the Timezone service and let the phone apps set the appropriate timezone

Diff for: libraries/RainMaker/examples/RMakerSwitch/RMakerSwitch.ino

+11-8
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ static int gpio_switch = 16;
2121
bool switch_state = true;
2222

2323
//The framework provides some standard device types like switch, lightbulb, fan, temperaturesensor.
24-
static Switch my_switch("Switch", &gpio_switch);
24+
static Switch my_switch;
2525

2626
void sysProvEvent(arduino_event_t *sys_event)
2727
{
28-
switch (sys_event->event_id) {
28+
switch (sys_event->event_id) {
2929
case ARDUINO_EVENT_PROV_START:
3030
#if CONFIG_IDF_TARGET_ESP32S2
3131
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
3232
printQR(service_name, pop, "softap");
3333
#else
3434
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
3535
printQR(service_name, pop, "ble");
36-
#endif
36+
#endif
3737
break;
3838
default:;
3939
}
@@ -59,18 +59,21 @@ void setup()
5959
pinMode(gpio_switch, OUTPUT);
6060
digitalWrite(gpio_switch, DEFAULT_POWER_MODE);
6161

62-
Node my_node;
62+
Node my_node;
6363
my_node = RMaker.initNode("ESP RainMaker Node");
6464

65+
//Initialize switch device
66+
my_switch = Switch("Switch", &gpio_switch);
67+
6568
//Standard switch device
6669
my_switch.addCb(write_callback);
67-
68-
//Add switch device to the node
70+
71+
//Add switch device to the node
6972
my_node.addDevice(my_switch);
7073

71-
//This is optional
74+
//This is optional
7275
RMaker.enableOTA(OTA_USING_PARAMS);
73-
//If you want to enable scheduling, set time zone for your region using setTimeZone().
76+
//If you want to enable scheduling, set time zone for your region using setTimeZone().
7477
//The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html
7578
// RMaker.setTimeZone("Asia/Shanghai");
7679
// Alternatively, enable the Timezone service and let the phone apps set the appropriate timezone

0 commit comments

Comments
 (0)