Skip to content

Commit 7bf77bc

Browse files
authored
Merge branch 'master' into uart-examples
2 parents 2efe918 + 8004a81 commit 7bf77bc

File tree

7 files changed

+219
-28
lines changed

7 files changed

+219
-28
lines changed

boards.txt

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19665,3 +19665,118 @@ redpill_esp32s3.menu.EraseFlash.all=Enabled
1966519665
redpill_esp32s3.menu.EraseFlash.all.upload.erase_cmd=-e
1966619666

1966719667
##############################################################
19668+
19669+
esp32c3m1IKit.name=ESP-C3-M1-I-Kit
19670+
19671+
esp32c3m1IKit.bootloader.tool=esptool_py
19672+
esp32c3m1IKit.bootloader.tool.default=esptool_py
19673+
19674+
esp32c3m1IKit.upload.tool=esptool_py
19675+
esp32c3m1IKit.upload.tool.default=esptool_py
19676+
esp32c3m1IKit.upload.tool.network=esp_ota
19677+
19678+
esp32c3m1IKit.upload.maximum_size=1310720
19679+
esp32c3m1IKit.upload.maximum_data_size=327680
19680+
esp32c3m1IKit.upload.flags=
19681+
esp32c3m1IKit.upload.extra_flags=
19682+
esp32c3m1IKit.upload.use_1200bps_touch=false
19683+
esp32c3m1IKit.upload.wait_for_upload_port=false
19684+
19685+
esp32c3m1IKit.serial.disableDTR=false
19686+
esp32c3m1IKit.serial.disableRTS=false
19687+
19688+
esp32c3m1IKit.build.tarch=riscv32
19689+
esp32c3m1IKit.build.target=esp
19690+
esp32c3m1IKit.build.mcu=esp32c3
19691+
esp32c3m1IKit.build.core=esp32
19692+
esp32c3m1IKit.build.variant=esp_c3_m1_i_kit
19693+
esp32c3m1IKit.build.board=ESP32C3_M1_I_KIT
19694+
esp32c3m1IKit.build.bootloader_addr=0x0
19695+
19696+
esp32c3m1IKit.build.cdc_on_boot=0
19697+
esp32c3m1IKit.build.f_cpu=160000000L
19698+
esp32c3m1IKit.build.flash_size=4MB
19699+
esp32c3m1IKit.build.flash_freq=80m
19700+
esp32c3m1IKit.build.flash_mode=qio
19701+
esp32c3m1IKit.build.boot=qio
19702+
esp32c3m1IKit.build.partitions=default
19703+
esp32c3m1IKit.build.defines=
19704+
19705+
esp32c3m1IKit.menu.CDCOnBoot.default=Disabled
19706+
esp32c3m1IKit.menu.CDCOnBoot.default.build.cdc_on_boot=0
19707+
esp32c3m1IKit.menu.CDCOnBoot.cdc=Enabled
19708+
esp32c3m1IKit.menu.CDCOnBoot.cdc.build.cdc_on_boot=1
19709+
19710+
esp32c3m1IKit.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
19711+
esp32c3m1IKit.menu.PartitionScheme.default.build.partitions=default
19712+
esp32c3m1IKit.menu.PartitionScheme.defaultffat=Default 4MB with ffat (1.2MB APP/1.5MB FATFS)
19713+
esp32c3m1IKit.menu.PartitionScheme.defaultffat.build.partitions=default_ffat
19714+
esp32c3m1IKit.menu.PartitionScheme.minimal=Minimal (1.3MB APP/700KB SPIFFS)
19715+
esp32c3m1IKit.menu.PartitionScheme.minimal.build.partitions=minimal
19716+
esp32c3m1IKit.menu.PartitionScheme.no_ota=No OTA (2MB APP/2MB SPIFFS)
19717+
esp32c3m1IKit.menu.PartitionScheme.no_ota.build.partitions=no_ota
19718+
esp32c3m1IKit.menu.PartitionScheme.no_ota.upload.maximum_size=2097152
19719+
esp32c3m1IKit.menu.PartitionScheme.noota_3g=No OTA (1MB APP/3MB SPIFFS)
19720+
esp32c3m1IKit.menu.PartitionScheme.noota_3g.build.partitions=noota_3g
19721+
esp32c3m1IKit.menu.PartitionScheme.noota_3g.upload.maximum_size=1048576
19722+
esp32c3m1IKit.menu.PartitionScheme.noota_ffat=No OTA (2MB APP/2MB FATFS)
19723+
esp32c3m1IKit.menu.PartitionScheme.noota_ffat.build.partitions=noota_ffat
19724+
esp32c3m1IKit.menu.PartitionScheme.noota_ffat.upload.maximum_size=2097152
19725+
esp32c3m1IKit.menu.PartitionScheme.noota_3gffat=No OTA (1MB APP/3MB FATFS)
19726+
esp32c3m1IKit.menu.PartitionScheme.noota_3gffat.build.partitions=noota_3gffat
19727+
esp32c3m1IKit.menu.PartitionScheme.noota_3gffat.upload.maximum_size=1048576
19728+
esp32c3m1IKit.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
19729+
esp32c3m1IKit.menu.PartitionScheme.huge_app.build.partitions=huge_app
19730+
esp32c3m1IKit.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
19731+
esp32c3m1IKit.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
19732+
esp32c3m1IKit.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
19733+
esp32c3m1IKit.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
19734+
esp32c3m1IKit.menu.PartitionScheme.rainmaker=RainMaker
19735+
esp32c3m1IKit.menu.PartitionScheme.rainmaker.build.partitions=rainmaker
19736+
esp32c3m1IKit.menu.PartitionScheme.rainmaker.upload.maximum_size=3145728
19737+
19738+
esp32c3m1IKit.menu.CPUFreq.160=160MHz (WiFi)
19739+
esp32c3m1IKit.menu.CPUFreq.160.build.f_cpu=160000000L
19740+
esp32c3m1IKit.menu.CPUFreq.80=80MHz (WiFi)
19741+
esp32c3m1IKit.menu.CPUFreq.80.build.f_cpu=80000000L
19742+
esp32c3m1IKit.menu.CPUFreq.40=40MHz
19743+
esp32c3m1IKit.menu.CPUFreq.40.build.f_cpu=40000000L
19744+
esp32c3m1IKit.menu.CPUFreq.20=20MHz
19745+
esp32c3m1IKit.menu.CPUFreq.20.build.f_cpu=20000000L
19746+
esp32c3m1IKit.menu.CPUFreq.10=10MHz
19747+
esp32c3m1IKit.menu.CPUFreq.10.build.f_cpu=10000000L
19748+
19749+
esp32c3m1IKit.menu.UploadSpeed.921600=921600
19750+
esp32c3m1IKit.menu.UploadSpeed.921600.upload.speed=921600
19751+
esp32c3m1IKit.menu.UploadSpeed.115200=115200
19752+
esp32c3m1IKit.menu.UploadSpeed.115200.upload.speed=115200
19753+
esp32c3m1IKit.menu.UploadSpeed.256000.windows=256000
19754+
esp32c3m1IKit.menu.UploadSpeed.256000.upload.speed=256000
19755+
esp32c3m1IKit.menu.UploadSpeed.230400.windows.upload.speed=256000
19756+
esp32c3m1IKit.menu.UploadSpeed.230400=230400
19757+
esp32c3m1IKit.menu.UploadSpeed.230400.upload.speed=230400
19758+
esp32c3m1IKit.menu.UploadSpeed.460800.linux=460800
19759+
esp32c3m1IKit.menu.UploadSpeed.460800.macosx=460800
19760+
esp32c3m1IKit.menu.UploadSpeed.460800.upload.speed=460800
19761+
esp32c3m1IKit.menu.UploadSpeed.512000.windows=512000
19762+
esp32c3m1IKit.menu.UploadSpeed.512000.upload.speed=512000
19763+
19764+
esp32c3m1IKit.menu.DebugLevel.none=None
19765+
esp32c3m1IKit.menu.DebugLevel.none.build.code_debug=0
19766+
esp32c3m1IKit.menu.DebugLevel.error=Error
19767+
esp32c3m1IKit.menu.DebugLevel.error.build.code_debug=1
19768+
esp32c3m1IKit.menu.DebugLevel.warn=Warn
19769+
esp32c3m1IKit.menu.DebugLevel.warn.build.code_debug=2
19770+
esp32c3m1IKit.menu.DebugLevel.info=Info
19771+
esp32c3m1IKit.menu.DebugLevel.info.build.code_debug=3
19772+
esp32c3m1IKit.menu.DebugLevel.debug=Debug
19773+
esp32c3m1IKit.menu.DebugLevel.debug.build.code_debug=4
19774+
esp32c3m1IKit.menu.DebugLevel.verbose=Verbose
19775+
esp32c3m1IKit.menu.DebugLevel.verbose.build.code_debug=5
19776+
19777+
esp32c3m1IKit.menu.EraseFlash.none=Disabled
19778+
esp32c3m1IKit.menu.EraseFlash.none.upload.erase_cmd=
19779+
esp32c3m1IKit.menu.EraseFlash.all=Enabled
19780+
esp32c3m1IKit.menu.EraseFlash.all.upload.erase_cmd=-e
19781+
19782+
##############################################################

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Espressif'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = '2.0.2'
25+
release = '2.0.6'
2626

2727
# -- General configuration ---------------------------------------------------
2828

esp_c3_m1_i_kit/pins_arduino.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
For more information about this board:
3+
https://docs.ai-thinker.com/_media/esp32/docs/nodemcu-esp-c3-m1-i-kit_v1.2.0_specification.pdf
4+
*/
5+
6+
#ifndef Pins_Arduino_h
7+
#define Pins_Arduino_h
8+
9+
#include <stdint.h>
10+
11+
#define EXTERNAL_NUM_INTERRUPTS 22
12+
#define NUM_DIGITAL_PINS 22
13+
#define NUM_ANALOG_INPUTS 6
14+
15+
#define analogInputToDigitalPin(p) (((p)<NUM_ANALOG_INPUTS)?(analogChannelToDigitalPin(p)):-1)
16+
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1)
17+
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS)
18+
19+
// User LEDs are also connected to USB D- and D+
20+
static const uint8_t LED_WARM = 18;
21+
static const uint8_t LED_COLD = 19;
22+
23+
// RGB LED
24+
static const uint8_t LED_RED = 3;
25+
static const uint8_t LED_GREEN = 4;
26+
static const uint8_t LED_BLUE = 5;
27+
28+
static const uint8_t LED_BUILTIN = LED_WARM;
29+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
30+
31+
// Standard ESP32-C3 GPIOs
32+
static const uint8_t TX = 21;
33+
static const uint8_t RX = 20;
34+
35+
static const uint8_t SDA = 8;
36+
static const uint8_t SCL = 9;
37+
38+
static const uint8_t SS = 7;
39+
static const uint8_t MOSI = 6;
40+
static const uint8_t MISO = 5;
41+
static const uint8_t SCK = 4;
42+
43+
static const uint8_t A0 = 0;
44+
static const uint8_t A1 = 1;
45+
static const uint8_t A2 = 2;
46+
static const uint8_t A3 = 3;
47+
static const uint8_t A4 = 4;
48+
static const uint8_t A5 = 5;
49+
50+
#endif /* Pins_Arduino_h */

libraries/RainMaker/examples/RMakerCustom/RMakerCustom.ino

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,19 @@ void sysProvEvent(arduino_event_t *sys_event)
2929
switch (sys_event->event_id) {
3030
case ARDUINO_EVENT_PROV_START:
3131
#if CONFIG_IDF_TARGET_ESP32S2
32-
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
33-
printQR(service_name, pop, "softap");
32+
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
33+
printQR(service_name, pop, "softap");
3434
#else
35-
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
36-
printQR(service_name, pop, "ble");
35+
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
36+
printQR(service_name, pop, "ble");
3737
#endif
38-
break;
38+
break;
39+
case ARDUINO_EVENT_PROV_INIT:
40+
wifi_prov_mgr_disable_auto_stop(10000);
41+
break;
42+
case ARDUINO_EVENT_PROV_CRED_SUCCESS:
43+
wifi_prov_mgr_stop_provisioning();
44+
break;
3945
default:;
4046
}
4147
}
@@ -83,7 +89,7 @@ void setup()
8389
my_node.addDevice(my_device);
8490

8591
//This is optional
86-
RMaker.enableOTA(OTA_USING_PARAMS);
92+
RMaker.enableOTA(OTA_USING_TOPICS);
8793
//If you want to enable scheduling, set time zone for your region using setTimeZone().
8894
//The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html
8995
// RMaker.setTimeZone("Asia/Shanghai");

libraries/RainMaker/examples/RMakerCustomAirCooler/RMakerCustomAirCooler.ino

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,19 @@ void sysProvEvent(arduino_event_t *sys_event)
4646
switch (sys_event->event_id) {
4747
case ARDUINO_EVENT_PROV_START:
4848
#if CONFIG_IDF_TARGET_ESP32S2
49-
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
50-
printQR(service_name, pop, "softap");
49+
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
50+
printQR(service_name, pop, "softap");
5151
#else
52-
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
53-
printQR(service_name, pop, "ble");
52+
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
53+
printQR(service_name, pop, "ble");
5454
#endif
55-
break;
55+
break;
56+
case ARDUINO_EVENT_PROV_INIT:
57+
wifi_prov_mgr_disable_auto_stop(10000);
58+
break;
59+
case ARDUINO_EVENT_PROV_CRED_SUCCESS:
60+
wifi_prov_mgr_stop_provisioning();
61+
break;
5662
default:;
5763
}
5864
}
@@ -143,7 +149,7 @@ void setup()
143149
my_node.addDevice(my_device);
144150

145151
//This is optional
146-
// RMaker.enableOTA(OTA_USING_PARAMS);
152+
// RMaker.enableOTA(OTA_USING_TOPICS);
147153
//If you want to enable scheduling, set time zone for your region using setTimeZone().
148154
//The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html
149155
// RMaker.setTimeZone("Asia/Shanghai");

libraries/RainMaker/examples/RMakerSonoffDualR3/RMakerSonoffDualR3.ino

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,29 @@ void sysProvEvent(arduino_event_t *sys_event)
3939
switch (sys_event->event_id) {
4040
case ARDUINO_EVENT_PROV_START:
4141
#if CONFIG_IDF_TARGET_ESP32
42-
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
43-
printQR(service_name, pop, "ble");
42+
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
43+
printQR(service_name, pop, "ble");
4444
#else
45-
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
46-
printQR(service_name, pop, "softap");
45+
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
46+
printQR(service_name, pop, "softap");
4747
#endif
48-
break;
48+
break;
4949
case ARDUINO_EVENT_WIFI_STA_CONNECTED:
50-
Serial.printf("\nConnected to Wi-Fi!\n");
51-
digitalWrite(gpio_led, true);
52-
break;
50+
Serial.printf("\nConnected to Wi-Fi!\n");
51+
digitalWrite(gpio_led, true);
52+
break;
53+
case ARDUINO_EVENT_PROV_INIT:
54+
wifi_prov_mgr_disable_auto_stop(10000);
55+
break;
56+
case ARDUINO_EVENT_PROV_CRED_SUCCESS:
57+
wifi_prov_mgr_stop_provisioning();
58+
break;
5359
default:;
5460
}
5561
}
5662

63+
64+
5765
void write_callback(Device *device, Param *param, const param_val_t val, void *priv_data, write_ctx_t *ctx)
5866
{
5967
const char *device_name = device->getDeviceName();
@@ -129,7 +137,7 @@ void setup()
129137
my_node.addDevice(my_switch2);
130138

131139
//This is optional
132-
RMaker.enableOTA(OTA_USING_PARAMS);
140+
RMaker.enableOTA(OTA_USING_TOPICS);
133141
//If you want to enable scheduling, set time zone for your region using setTimeZone().
134142
//The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html
135143
// RMaker.setTimeZone("Asia/Shanghai");

libraries/RainMaker/examples/RMakerSwitch/RMakerSwitch.ino

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,19 @@ void sysProvEvent(arduino_event_t *sys_event)
2828
switch (sys_event->event_id) {
2929
case ARDUINO_EVENT_PROV_START:
3030
#if CONFIG_IDF_TARGET_ESP32S2
31-
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
32-
printQR(service_name, pop, "softap");
31+
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on SoftAP\n", service_name, pop);
32+
printQR(service_name, pop, "softap");
3333
#else
34-
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
35-
printQR(service_name, pop, "ble");
34+
Serial.printf("\nProvisioning Started with name \"%s\" and PoP \"%s\" on BLE\n", service_name, pop);
35+
printQR(service_name, pop, "ble");
3636
#endif
37-
break;
37+
break;
38+
case ARDUINO_EVENT_PROV_INIT:
39+
wifi_prov_mgr_disable_auto_stop(10000);
40+
break;
41+
case ARDUINO_EVENT_PROV_CRED_SUCCESS:
42+
wifi_prov_mgr_stop_provisioning();
43+
break;
3844
default:;
3945
}
4046
}
@@ -72,7 +78,7 @@ void setup()
7278
my_node.addDevice(my_switch);
7379

7480
//This is optional
75-
RMaker.enableOTA(OTA_USING_PARAMS);
81+
RMaker.enableOTA(OTA_USING_TOPICS);
7682
//If you want to enable scheduling, set time zone for your region using setTimeZone().
7783
//The list of available values are provided here https://rainmaker.espressif.com/docs/time-service.html
7884
// RMaker.setTimeZone("Asia/Shanghai");

0 commit comments

Comments
 (0)