Skip to content

Commit

Permalink
fix(example): Fix compilation warnings in examples (espressif#10311)
Browse files Browse the repository at this point in the history
* fix(example): Fix compilation warnings in examples

* ci(pre-commit): Apply automatic fixes

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
P-R-O-C-H-Y and pre-commit-ci-lite[bot] authored Sep 10, 2024
1 parent d846311 commit 1e04762
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
// Please read file README.md in the folder containing this example.

#if CONFIG_FREERTOS_UNICORE
#define ARDUINO_RUNNING_CORE 0
#define TASK_RUNNING_CORE 0
#else
#define ARDUINO_RUNNING_CORE 1
#define TASK_RUNNING_CORE 1
#endif

#define ANALOG_INPUT_PIN A0
Expand Down Expand Up @@ -51,7 +51,7 @@ void setup() {
,
&analog_read_task_handle // With task handle we will be able to manipulate with this task.
,
ARDUINO_RUNNING_CORE // Core on which the task will run
TASK_RUNNING_CORE // Core on which the task will run
);

Serial.printf("Basic Multi Threading Arduino Example\n");
Expand Down
5 changes: 5 additions & 0 deletions libraries/ESP32/examples/HWCDC_Events/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
"targets": {
"esp32": false,
"esp32s2": false
},
"fqbn": {
"esp32s3": [
"espressif:esp32:esp32s3:USBMode=hwcdc,PartitionScheme=huge_app,FlashMode=dio"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#ifndef ESP32_ARDUINO_NO_RGB_BUILTIN

// add the file "build_opt.h" to your Arduino project folder with "-DESP32_ARDUINO_NO_RGB_BUILTIN" to use the RMT Legacy driver
#error "ESP32_ARDUINO_NO_RGB_BUILTIN is not defined, this example is intended to demonstrate the RMT Legacy driver.
#error "ESP32_ARDUINO_NO_RGB_BUILTIN is not defined, this example is intended to demonstrate the RMT Legacy driver."
#error "Please add the file 'build_opt.h' with '-DESP32_ARDUINO_NO_RGB_BUILTIN' to your Arduino project folder."
#error "Another way to disable the RGB_BUILTIN is to define it in the platformio.ini file, for instance: '-D ESP32_ARDUINO_NO_RGB_BUILTIN'"

Expand Down
5 changes: 5 additions & 0 deletions libraries/ESP_SR/examples/Basic/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
"esp32c6": false,
"esp32h2": false,
"esp32s2": false
},
"fqbn": {
"esp32s3": [
"espressif:esp32:esp32s3:USBMode=default,PartitionScheme=esp_sr_16,FlashSize=16M,FlashMode=dio"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ static void smoke_test() {
Insights.event(TAG, "[count][%d]", count);
} else {
log_e("[count][%d] [crash_count][%" PRIu32 "] [excvaddr][0x0f] Crashing...", count, s_reset_count);
*(int *)0x0F = 0x10;
abort();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void loop() {
}

// USB MIDI 1.0 to MIDI Serial 1.0
midiEventPacket_t midi_packet_in = {0};
midiEventPacket_t midi_packet_in = {0, 0, 0, 0};
// See Chapter 4: USB-MIDI Event Packets (page 16) of the spec.
int8_t cin_to_midix_size[16] = {-1, -1, 2, 3, 3, 1, 2, 3, 3, 3, 3, 3, 2, 2, 3, 1};

Expand Down
2 changes: 1 addition & 1 deletion libraries/USB/examples/MIDI/ReceiveMidi/ReceiveMidi.ino
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ void setup() {
}

void loop() {
midiEventPacket_t midi_packet_in = {0};
midiEventPacket_t midi_packet_in = {0, 0, 0, 0};

if (MIDI.readPacket(&midi_packet_in)) {
printDetails(midi_packet_in);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ void execOTA() {
// Understand the partitions and
// space availability
Serial.println("Not enough space to begin OTA");
client.flush();
client.clear();
}
} else {
Serial.println("There was no content in the response");
client.flush();
client.clear();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const char *password = "........";
WebServer server(80);

typedef struct credentials_t {
char *username;
char *password;
const char *username;
const char *password;
} credentials_t;

credentials_t passwdfile[] = {{"admin", "esp32"}, {"fred", "41234123"}, {"charlie", "sdfsd"}, {"alice", "vambdnkuhj"}, {"bob", "svcdbjhws12"}, {NULL, NULL}};
Expand Down

0 comments on commit 1e04762

Please sign in to comment.