Skip to content

Commit

Permalink
Fix broken examples
Browse files Browse the repository at this point in the history
  • Loading branch information
me-no-dev committed Jul 18, 2023
1 parent f4cfacd commit 065ced1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions cores/esp32/esp32-hal-matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#ifdef ESP_IDF_VERSION_MAJOR // IDF 4+
#include "soc/gpio_pins.h"
#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4
#include "esp32/rom/gpio.h"
#elif CONFIG_IDF_TARGET_ESP32S2
#include "esp32s2/rom/gpio.h"
#elif CONFIG_IDF_TARGET_ESP32S3
Expand Down
10 changes: 5 additions & 5 deletions libraries/ESP32/examples/TWAI/TWAItransmit/TWAItransmit.ino
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ void loop() {
}
if (alerts_triggered & TWAI_ALERT_BUS_ERROR) {
Serial.println("Alert: A (Bit, Stuff, CRC, Form, ACK) error has occurred on the bus.");
Serial.printf("Bus error count: %d\n", twaistatus.bus_error_count);
Serial.printf("Bus error count: %lu\n", twaistatus.bus_error_count);
}
if (alerts_triggered & TWAI_ALERT_TX_FAILED) {
Serial.println("Alert: The Transmission failed.");
Serial.printf("TX buffered: %d\t", twaistatus.msgs_to_tx);
Serial.printf("TX error: %d\t", twaistatus.tx_error_counter);
Serial.printf("TX failed: %d\n", twaistatus.tx_failed_count);
Serial.printf("TX buffered: %lu\t", twaistatus.msgs_to_tx);
Serial.printf("TX error: %lu\t", twaistatus.tx_error_counter);
Serial.printf("TX failed: %lu\n", twaistatus.tx_failed_count);
}
if (alerts_triggered & TWAI_ALERT_TX_SUCCESS) {
Serial.println("Alert: The Transmission was successful.");
Serial.printf("TX buffered: %d\t", twaistatus.msgs_to_tx);
Serial.printf("TX buffered: %lu\t", twaistatus.msgs_to_tx);
}

// Send message
Expand Down

0 comments on commit 065ced1

Please sign in to comment.