Skip to content

Commit 04a7a18

Browse files
committed
Fix examples
1 parent 486840f commit 04a7a18

File tree

39 files changed

+65
-75
lines changed

39 files changed

+65
-75
lines changed

libraries/BLE/examples/BLE_Beacon_Scanner/BLE_Beacon_Scanner.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,8 @@ class MyAdvertisedDeviceCallbacks : public BLEAdvertisedDeviceCallbacks
118118
int temp = (int)payLoad[16] + (int)(payLoad[15] << 8);
119119
float calcTemp = temp / 256.0f;
120120
Serial.printf("Reported temperature from data: %.2fC\n", calcTemp);
121-
Serial.printf("Reported advertise count: %d\n", foundEddyURL.getCount());
122-
Serial.printf("Reported time since last reboot: %ds\n", foundEddyURL.getTime());
121+
Serial.printf("Reported advertise count: %lu\n", foundEddyURL.getCount());
122+
Serial.printf("Reported time since last reboot: %lus\n", foundEddyURL.getTime());
123123
Serial.println("\n");
124124
Serial.print(foundEddyURL.toString().c_str());
125125
Serial.println("\n");

libraries/BLE/examples/BLE_EddystoneTLM_Beacon/BLE_EddystoneTLM_Beacon.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ void setup()
8686
Serial.begin(115200);
8787
gettimeofday(&nowTimeStruct, NULL);
8888

89-
Serial.printf("start ESP32 %d\n", bootcount++);
89+
Serial.printf("start ESP32 %lu\n", bootcount++);
9090

91-
Serial.printf("deep sleep (%lds since last reset, %lds since last boot)\n", nowTimeStruct.tv_sec, nowTimeStruct.tv_sec - last);
91+
Serial.printf("deep sleep (%llds since last reset, %llds since last boot)\n", nowTimeStruct.tv_sec, nowTimeStruct.tv_sec - last);
9292

9393
last = nowTimeStruct.tv_sec;
9494
lastTenth = nowTimeStruct.tv_sec * 10; // Time since last reset as 0.1 second resolution counter

libraries/BLE/examples/BLE_EddystoneURL_Beacon/BLE_EddystoneURL_Beacon.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,9 @@ void setup()
160160
Serial.begin(115200);
161161
gettimeofday(&now, NULL);
162162

163-
Serial.printf("start ESP32 %d\n", bootcount++);
163+
Serial.printf("start ESP32 %lu\n", bootcount++);
164164

165-
Serial.printf("deep sleep (%lds since last reset, %lds since last boot)\n", now.tv_sec, now.tv_sec - last);
165+
Serial.printf("deep sleep (%llds since last reset, %llds since last boot)\n", now.tv_sec, now.tv_sec - last);
166166

167167
last = now.tv_sec;
168168

libraries/EEPROM/examples/eeprom_extra/eeprom_extra.ino

+4-4
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ void setup() {
107107

108108
value = 0;
109109
value = EEPROM.readLong64(value);
110-
Serial.printf("0x%08X", (uint32_t)(value >> 32)); // Print High 4 bytes in HEX
111-
Serial.printf("%08X\n", (uint32_t)value); // Print Low 4 bytes in HEX
110+
Serial.printf("0x%08lX", (uint32_t)(value >> 32)); // Print High 4 bytes in HEX
111+
Serial.printf("%08lX\n", (uint32_t)value); // Print Low 4 bytes in HEX
112112
address += sizeof(int64_t);
113113

114114
Value = 0; // Clear Value
115115
Value = EEPROM.readULong64(Value);
116-
Serial.printf("0x%08X", (uint32_t)(Value >> 32)); // Print High 4 bytes in HEX
117-
Serial.printf("%08X\n", (uint32_t)Value); // Print Low 4 bytes in HEX
116+
Serial.printf("0x%08lX", (uint32_t)(Value >> 32)); // Print High 4 bytes in HEX
117+
Serial.printf("%08lX\n", (uint32_t)Value); // Print Low 4 bytes in HEX
118118
address += sizeof(uint64_t);
119119

120120
Serial.println(EEPROM.readFloat(address), 4);

libraries/ESP32/examples/AnalogOut/ledcFrequency/ledcFrequency.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ void setup() {
1919
uint32_t max_frequency;
2020
uint32_t frequency;
2121
uint32_t successful_frequency;
22-
uint32_t max_freq_array[SOC_LEDC_TIMER_BIT_WIDE_NUM];
23-
uint32_t min_freq_array[SOC_LEDC_TIMER_BIT_WIDE_NUM];
22+
uint32_t max_freq_array[SOC_LEDC_TIMER_BIT_WIDTH];
23+
uint32_t min_freq_array[SOC_LEDC_TIMER_BIT_WIDTH];
2424

2525
// Find Max Frequency
26-
for(uint8_t resolution = 1; resolution <= SOC_LEDC_TIMER_BIT_WIDE_NUM; ++resolution){
26+
for(uint8_t resolution = 1; resolution <= SOC_LEDC_TIMER_BIT_WIDTH; ++resolution){
2727
max_freq_array[resolution-1] = 0;
2828
min_frequency = 0;
2929
max_frequency = UINT32_MAX;
@@ -41,7 +41,7 @@ void setup() {
4141
} // for all resolutions
4242

4343
// Find Min Frequency
44-
for(uint8_t resolution = 1; resolution <= SOC_LEDC_TIMER_BIT_WIDE_NUM; ++resolution){
44+
for(uint8_t resolution = 1; resolution <= SOC_LEDC_TIMER_BIT_WIDTH; ++resolution){
4545
min_freq_array[resolution-1] = 0;
4646
min_frequency = 0;
4747
max_frequency = max_freq_array[resolution-1];
@@ -59,9 +59,9 @@ void setup() {
5959
} // for all resolutions
6060

6161
printf("Bit resolution | Min Frequency [Hz] | Max Frequency [Hz]\n");
62-
for(uint8_t r = 1; r <= SOC_LEDC_TIMER_BIT_WIDE_NUM; ++r){
62+
for(uint8_t r = 1; r <= SOC_LEDC_TIMER_BIT_WIDTH; ++r){
6363
size_t max_len = std::to_string(UINT32_MAX).length();
64-
printf(" %s%d | %s%u | %s%u\n",
64+
printf(" %s%d | %s%lu | %s%lu\n",
6565
std::string (2 - std::to_string(r).length(), ' ').c_str(), r,
6666
std::string (max_len - std::to_string(min_freq_array[r-1]).length(), ' ').c_str(),
6767
min_freq_array[r-1],

libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static esp_err_t bmp_handler(httpd_req_t *req)
313313
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
314314

315315
char ts[32];
316-
snprintf(ts, 32, "%ld.%06ld", fb->timestamp.tv_sec, fb->timestamp.tv_usec);
316+
snprintf(ts, 32, "%lld.%06ld", fb->timestamp.tv_sec, fb->timestamp.tv_usec);
317317
httpd_resp_set_hdr(req, "X-Timestamp", (const char *)ts);
318318

319319

@@ -379,7 +379,7 @@ static esp_err_t capture_handler(httpd_req_t *req)
379379
httpd_resp_set_hdr(req, "Access-Control-Allow-Origin", "*");
380380

381381
char ts[32];
382-
snprintf(ts, 32, "%ld.%06ld", fb->timestamp.tv_sec, fb->timestamp.tv_usec);
382+
snprintf(ts, 32, "%lld.%06ld", fb->timestamp.tv_sec, fb->timestamp.tv_usec);
383383
httpd_resp_set_hdr(req, "X-Timestamp", (const char *)ts);
384384

385385
#if CONFIG_ESP_FACE_DETECT_ENABLED

libraries/ESP32/examples/DeepSleep/SmoothBlink_ULP_Code/SmoothBlink_ULP_Code.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <Arduino.h>
99
#include "esp32/ulp.h"
1010
#include "driver/rtc_io.h"
11+
#include "soc/rtc_io_reg.h"
1112

1213
// RTC Memory used for ULP internal variable and Sketch interfacing
1314
#define RTC_dutyMeter 0
@@ -143,7 +144,7 @@ void setup() {
143144
while (!Serial) {} // wait for Serial to start
144145

145146
ulp_setup(); // it really only runs on the first ESP32 boot
146-
Serial.printf("\nStarted smooth blink with delay %d\n", *fadeCycleDelay);
147+
Serial.printf("\nStarted smooth blink with delay %ld\n", *fadeCycleDelay);
147148

148149
// *fadeCycleDelay resides in RTC_SLOW_MEM and persists along deep sleep waking up
149150
// it is used as a delay time parameter for smooth blinking, in the ULP processing code

libraries/ESP32/examples/ESPNow/Basic/Slave/Slave.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ void setup() {
7878
}
7979

8080
// callback when data is recv from Master
81-
void OnDataRecv(const uint8_t *mac_addr, const uint8_t *data, int data_len) {
81+
void OnDataRecv(const esp_now_recv_info_t * info, const uint8_t *data, int data_len) {
8282
char macStr[18];
8383
snprintf(macStr, sizeof(macStr), "%02x:%02x:%02x:%02x:%02x:%02x",
84-
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
84+
info->src_addr[0], info->src_addr[1], info->src_addr[2], info->src_addr[3], info->src_addr[4], info->src_addr[5]);
8585
Serial.print("Last Packet Recv from: "); Serial.println(macStr);
8686
Serial.print("Last Packet Recv Data: "); Serial.println(*data);
8787
Serial.println("");

libraries/ESP32/examples/ESPNow/Multi-Slave/Slave/Slave.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ void setup() {
8080
}
8181

8282
// callback when data is recv from Master
83-
void OnDataRecv(const uint8_t *mac_addr, const uint8_t *data, int data_len) {
83+
void OnDataRecv(const esp_now_recv_info_t * info, const uint8_t *data, int data_len) {
8484
char macStr[18];
8585
snprintf(macStr, sizeof(macStr), "%02x:%02x:%02x:%02x:%02x:%02x",
86-
mac_addr[0], mac_addr[1], mac_addr[2], mac_addr[3], mac_addr[4], mac_addr[5]);
86+
info->src_addr[0], info->src_addr[1], info->src_addr[2], info->src_addr[3], info->src_addr[4], info->src_addr[5]);
8787
Serial.print("Last Packet Recv from: "); Serial.println(macStr);
8888
Serial.print("Last Packet Recv Data: "); Serial.println(*data);
8989
Serial.println("");

libraries/ESP32/examples/GPIO/FunctionalInterrupt/FunctionalInterrupt.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public:
2222

2323
void checkPressed() {
2424
if (pressed) {
25-
Serial.printf("Button on pin %u has been pressed %u times\n", PIN, numberKeyPresses);
25+
Serial.printf("Button on pin %u has been pressed %lu times\n", PIN, numberKeyPresses);
2626
pressed = false;
2727
}
2828
}

libraries/ESP32/examples/GPIO/GPIOInterrupt/GPIOInterrupt.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ void setup() {
3030

3131
void loop() {
3232
if (button1.pressed) {
33-
Serial.printf("Button 1 has been pressed %u times\n", button1.numberKeyPresses);
33+
Serial.printf("Button 1 has been pressed %lu times\n", button1.numberKeyPresses);
3434
button1.pressed = false;
3535
}
3636
if (button2.pressed) {
37-
Serial.printf("Button 2 has been pressed %u times\n", button2.numberKeyPresses);
37+
Serial.printf("Button 2 has been pressed %lu times\n", button2.numberKeyPresses);
3838
button2.pressed = false;
3939
}
4040
static uint32_t lastMillis = 0;

libraries/ESP32/examples/HallSensor/.skip.esp32c3

Whitespace-only changes.

libraries/ESP32/examples/HallSensor/.skip.esp32s2

Whitespace-only changes.

libraries/ESP32/examples/HallSensor/.skip.esp32s3

Whitespace-only changes.

libraries/ESP32/examples/HallSensor/HallSensor.ino

-15
This file was deleted.

libraries/ESP32/examples/I2S/HiFreq_ADC/HiFreq_ADC.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ void loop(){
120120
if(read_counter == AVERAGE_EVERY_N_SAMPLES){
121121
averaged_reading = read_sum / AVERAGE_EVERY_N_SAMPLES;
122122
//Serial.printf("averaged_reading = %d over %d samples\n", averaged_reading, read_counter); // Print with additional info
123-
Serial.printf("Averaged_signal:%d", averaged_reading); // Print compatible with Arduino Plotter
123+
Serial.printf("Averaged_signal:%ld", averaged_reading); // Print compatible with Arduino Plotter
124124
read_counter = 0;
125125
read_sum = 0;
126126
}

libraries/ESP32/examples/RMT/RMTCallback/RMTCallback.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ void setup()
6262

6363
void loop()
6464
{
65-
Serial.printf("GPIO 4: %08x 5: %08x 10: %08x\n", mp1.val(), mp2.val(), mp3.val());
65+
Serial.printf("GPIO 4: %08lx 5: %08lx 10: %08lx\n", mp1.val(), mp2.val(), mp3.val());
6666
delay(500);
6767
}

libraries/ESP32/examples/RMT/RMTLoopback/RMTLoopback.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void loop()
6565
// Printout the received data plus the original values
6666
for (i=0; i<60; i++)
6767
{
68-
Serial.printf("%08x=%08x ", my_data[i].val, data[i].val );
68+
Serial.printf("%08lx=%08lx ", my_data[i].val, data[i].val );
6969
if (!((i+1)%4)) Serial.println("\n");
7070
}
7171
Serial.println("\n");

libraries/ESP32/examples/RMT/RMTReadXJT/RMTReadXJT.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,6 @@ void setup()
198198
void loop()
199199
{
200200
// printout some of the channels
201-
Serial.printf("%04x %04x %04x %04x\n", channels[0], channels[1], channels[2], channels[3]);
201+
Serial.printf("%04lx %04lx %04lx %04lx\n", channels[0], channels[1], channels[2], channels[3]);
202202
delay(500);
203203
}

libraries/ESP32/examples/Serial/RxFIFOFull_Demo/RxFIFOFull_Demo.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,10 @@ void testAndReport(uint8_t fifoFull) {
9191

9292
uint32_t pastTime = millis() - now;
9393
Serial.printf("\nIt has sent %d bytes from Serial1 TX to Serial1 RX\n", sentBytes);
94-
Serial.printf("It took %d milliseconds to read %d bytes\n", pastTime, bytesReceived);
94+
Serial.printf("It took %lu milliseconds to read %d bytes\n", pastTime, bytesReceived);
9595
Serial.printf("Per execution Serial.read() number of bytes data and time information:\n");
9696
for (i = 0; i < DATA_SIZE; i++) {
97-
Serial.printf("#%03d - Received %03d bytes after %d ms.\n", i, bytesJustReceived[i], i > 0 ? timeStamp[i] - timeStamp[i - 1] : timeStamp[i] - now);
97+
Serial.printf("#%03d - Received %03lu bytes after %lu ms.\n", i, bytesJustReceived[i], i > 0 ? timeStamp[i] - timeStamp[i - 1] : timeStamp[i] - now);
9898
if (i != DATA_SIZE - 1 && bytesJustReceived[i + 1] == 0) break;
9999
}
100100

libraries/ESP32/examples/Serial/RxTimeout_Demo/RxTimeout_Demo.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void testAndReport(uint8_t rxTimeout) {
8787

8888
uint32_t pastTime = millis() - now;
8989
Serial.printf("\nIt has sent %d bytes from Serial1 TX to Serial1 RX\n", sentBytes);
90-
Serial.printf("It took %d milliseconds to read %d bytes\n", pastTime, bytesReceived);
90+
Serial.printf("It took %lu milliseconds to read %d bytes\n", pastTime, bytesReceived);
9191
Serial.print("Received data: [");
9292
Serial.write(dataReceived, DATA_SIZE);
9393
Serial.println("]");

libraries/ESP32/examples/TWAI/TWAIreceive/TWAIreceive.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ static void handle_rx_message(twai_message_t& message) {
8080
} else {
8181
Serial.println("Message is in Standard Format");
8282
}
83-
Serial.printf("ID: %x\nByte:", message.identifier);
83+
Serial.printf("ID: %lx\nByte:", message.identifier);
8484
if (!(message.rtr)) {
8585
for (int i = 0; i < message.data_length_code; i++) {
8686
Serial.printf(" %d = %02x,", i, message.data[i]);
@@ -107,13 +107,13 @@ void loop() {
107107
}
108108
if (alerts_triggered & TWAI_ALERT_BUS_ERROR) {
109109
Serial.println("Alert: A (Bit, Stuff, CRC, Form, ACK) error has occurred on the bus.");
110-
Serial.printf("Bus error count: %d\n", twaistatus.bus_error_count);
110+
Serial.printf("Bus error count: %lu\n", twaistatus.bus_error_count);
111111
}
112112
if (alerts_triggered & TWAI_ALERT_RX_QUEUE_FULL) {
113113
Serial.println("Alert: The RX queue is full causing a received frame to be lost.");
114-
Serial.printf("RX buffered: %d\t", twaistatus.msgs_to_rx);
115-
Serial.printf("RX missed: %d\t", twaistatus.rx_missed_count);
116-
Serial.printf("RX overrun %d\n", twaistatus.rx_overrun_count);
114+
Serial.printf("RX buffered: %lu\t", twaistatus.msgs_to_rx);
115+
Serial.printf("RX missed: %lu\t", twaistatus.rx_missed_count);
116+
Serial.printf("RX overrun %lu\n", twaistatus.rx_overrun_count);
117117
}
118118

119119
// Check if message is received

libraries/ESP32/examples/Timer/WatchdogTimer/WatchdogTimer.ino

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "esp_system.h"
2+
#include "rom/ets_sys.h"
23

34
const int button = 0; //gpio to use to trigger delay
45
const int wdtTimeout = 3000; //time in ms to trigger the watchdog

libraries/FFat/examples/FFat_Test/FFat_Test.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void testFileIO(fs::FS &fs, const char * path){
127127
}
128128
Serial.println("");
129129
uint32_t end = millis() - start;
130-
Serial.printf(" - %u bytes written in %u ms\r\n", 2048 * 512, end);
130+
Serial.printf(" - %u bytes written in %lu ms\r\n", 2048 * 512, end);
131131
file.close();
132132

133133
file = fs.open(path);
@@ -152,7 +152,7 @@ void testFileIO(fs::FS &fs, const char * path){
152152
}
153153
Serial.println("");
154154
end = millis() - start;
155-
Serial.printf("- %u bytes read in %u ms\r\n", flen, end);
155+
Serial.printf("- %u bytes read in %lu ms\r\n", flen, end);
156156
file.close();
157157
} else {
158158
Serial.println("- failed to open file for reading");

libraries/I2S/examples/SimpleTone/SimpleTone.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const int bps = 16;
3535

3636
const int halfWavelength = (sampleRate / frequency); // half wavelength of square wave
3737

38-
short sample = amplitude; // current sample value
38+
int32_t sample = amplitude; // current sample value
3939
int count = 0;
4040

4141
i2s_mode_t mode = I2S_PHILIPS_MODE; // I2S decoder is needed

libraries/LittleFS/examples/LITTLEFS_test/LITTLEFS_test.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void testFileIO(fs::FS &fs, const char * path){
208208
}
209209
Serial.println("");
210210
uint32_t end = millis() - start;
211-
Serial.printf(" - %u bytes written in %u ms\r\n", 2048 * 512, end);
211+
Serial.printf(" - %u bytes written in %lu ms\r\n", 2048 * 512, end);
212212
file.close();
213213

214214
file = fs.open(path);
@@ -233,7 +233,7 @@ void testFileIO(fs::FS &fs, const char * path){
233233
}
234234
Serial.println("");
235235
end = millis() - start;
236-
Serial.printf("- %u bytes read in %u ms\r\n", flen, end);
236+
Serial.printf("- %u bytes read in %lu ms\r\n", flen, end);
237237
file.close();
238238
} else {
239239
Serial.println("- failed to open file for reading");

libraries/RainMaker/examples/RMakerSonoffDualR3/RMakerSonoffDualR3.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void setup()
151151
chipId |= ((ESP.getEfuseMac() >> (40 - i)) & 0xff) << i;
152152
}
153153

154-
Serial.printf("\nChip ID: %d Service Name: %s\n", chipId, service_name);
154+
Serial.printf("\nChip ID: %lu Service Name: %s\n", chipId, service_name);
155155

156156
Serial.printf("\nStarting ESP-RainMaker\n");
157157
RMaker.start();

libraries/SD/examples/SD_Test/SD_Test.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ void testFileIO(fs::FS &fs, const char * path){
150150
len -= toRead;
151151
}
152152
end = millis() - start;
153-
Serial.printf("%u bytes read for %u ms\n", flen, end);
153+
Serial.printf("%u bytes read for %lu ms\n", flen, end);
154154
file.close();
155155
} else {
156156
Serial.println("Failed to open file for reading");
@@ -169,7 +169,7 @@ void testFileIO(fs::FS &fs, const char * path){
169169
file.write(buf, 512);
170170
}
171171
end = millis() - start;
172-
Serial.printf("%u bytes written for %u ms\n", 2048 * 512, end);
172+
Serial.printf("%u bytes written for %lu ms\n", 2048 * 512, end);
173173
file.close();
174174
}
175175

libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ void testFileIO(fs::FS &fs, const char * path){
147147
len -= toRead;
148148
}
149149
end = millis() - start;
150-
Serial.printf("%u bytes read for %u ms\n", flen, end);
150+
Serial.printf("%u bytes read for %lu ms\n", flen, end);
151151
file.close();
152152
} else {
153153
Serial.println("Failed to open file for reading");
@@ -166,7 +166,7 @@ void testFileIO(fs::FS &fs, const char * path){
166166
file.write(buf, 512);
167167
}
168168
end = millis() - start;
169-
Serial.printf("%u bytes written for %u ms\n", 2048 * 512, end);
169+
Serial.printf("%u bytes written for %lu ms\n", 2048 * 512, end);
170170
file.close();
171171
}
172172

libraries/SPIFFS/examples/SPIFFS_Test/SPIFFS_Test.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void testFileIO(fs::FS &fs, const char * path){
125125
}
126126
Serial.println("");
127127
uint32_t end = millis() - start;
128-
Serial.printf(" - %u bytes written in %u ms\r\n", 2048 * 512, end);
128+
Serial.printf(" - %u bytes written in %lu ms\r\n", 2048 * 512, end);
129129
file.close();
130130

131131
file = fs.open(path);
@@ -150,7 +150,7 @@ void testFileIO(fs::FS &fs, const char * path){
150150
}
151151
Serial.println("");
152152
end = millis() - start;
153-
Serial.printf("- %u bytes read in %u ms\r\n", flen, end);
153+
Serial.printf("- %u bytes read in %lu ms\r\n", flen, end);
154154
file.close();
155155
} else {
156156
Serial.println("- failed to open file for reading");

libraries/USB/examples/CompositeDevice/CompositeDevice.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void usbEventCallback(void* arg, esp_event_base_t event_base, int32_t eve
6767
HWSerial.printf("CDC LINE STATE: dtr: %u, rts: %u\n", data->line_state.dtr, data->line_state.rts);
6868
break;
6969
case ARDUINO_USB_CDC_LINE_CODING_EVENT:
70-
HWSerial.printf("CDC LINE CODING: bit_rate: %u, data_bits: %u, stop_bits: %u, parity: %u\n", data->line_coding.bit_rate, data->line_coding.data_bits, data->line_coding.stop_bits, data->line_coding.parity);
70+
HWSerial.printf("CDC LINE CODING: bit_rate: %lu, data_bits: %u, stop_bits: %u, parity: %u\n", data->line_coding.bit_rate, data->line_coding.data_bits, data->line_coding.stop_bits, data->line_coding.parity);
7171
break;
7272
case ARDUINO_USB_CDC_RX_EVENT:
7373
HWSerial.printf("CDC RX [%u]:", data->rx.len);

0 commit comments

Comments
 (0)