Skip to content

Commit 065ced1

Browse files
committed
Fix broken examples
1 parent f4cfacd commit 065ced1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Diff for: cores/esp32/esp32-hal-matrix.c

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
2020
#include "soc/gpio_pins.h"
2121
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
22+
#include "esp32/rom/gpio.h"
2223
#elif CONFIG_IDF_TARGET_ESP32S2
2324
#include "esp32s2/rom/gpio.h"
2425
#elif CONFIG_IDF_TARGET_ESP32S3

Diff for: libraries/ESP32/examples/TWAI/TWAItransmit/TWAItransmit.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,17 @@ void loop() {
101101
}
102102
if (alerts_triggered & TWAI_ALERT_BUS_ERROR) {
103103
Serial.println("Alert: A (Bit, Stuff, CRC, Form, ACK) error has occurred on the bus.");
104-
Serial.printf("Bus error count: %d\n", twaistatus.bus_error_count);
104+
Serial.printf("Bus error count: %lu\n", twaistatus.bus_error_count);
105105
}
106106
if (alerts_triggered & TWAI_ALERT_TX_FAILED) {
107107
Serial.println("Alert: The Transmission failed.");
108-
Serial.printf("TX buffered: %d\t", twaistatus.msgs_to_tx);
109-
Serial.printf("TX error: %d\t", twaistatus.tx_error_counter);
110-
Serial.printf("TX failed: %d\n", twaistatus.tx_failed_count);
108+
Serial.printf("TX buffered: %lu\t", twaistatus.msgs_to_tx);
109+
Serial.printf("TX error: %lu\t", twaistatus.tx_error_counter);
110+
Serial.printf("TX failed: %lu\n", twaistatus.tx_failed_count);
111111
}
112112
if (alerts_triggered & TWAI_ALERT_TX_SUCCESS) {
113113
Serial.println("Alert: The Transmission was successful.");
114-
Serial.printf("TX buffered: %d\t", twaistatus.msgs_to_tx);
114+
Serial.printf("TX buffered: %lu\t", twaistatus.msgs_to_tx);
115115
}
116116

117117
// Send message

0 commit comments

Comments
 (0)