Skip to content

Missing parameter for log_w in esp32-hal-gpio.c line 188 #11265

Closed
@ArminJo

Description

@ArminJo

Board

LOLIN C3 Mini

Device Description

C3

Hardware Configuration

No

Version

latest stable Release (if not listed below)

IDE Name

Arduino IDE

Operating System

windows

Flash frequency

40Mhz

PSRAM enabled

yes

Upload speed

115200

Description

in https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/esp32-hal-gpio.c function __digitalRead()

extern int ARDUINO_ISR_ATTR __digitalRead(uint8_t pin) {
#ifdef RGB_BUILTIN
  if (pin == RGB_BUILTIN) {
    return RGB_BUILTIN_storage;
  }
#endif  // RGB_BUILTIN
  // This work when the pin is set as GPIO and in INPUT mode. For all other pin functions, it may return inconsistent response
  if (perimanGetPinBus(pin, ESP32_BUS_TYPE_GPIO) == NULL) {
    log_w("IO %i is not set as GPIO. digitalRead() may return an inconsistent value.");
  }
  return gpio_get_level((gpio_num_t)pin);
}

line 188 is wrong!
log_w("IO %i is not set as GPIO. digitalRead() may return an inconsistent value.");
should be
log_w("IO %i is not set as GPIO. digitalRead() may return an inconsistent value.",pin);
Please correct it.

Sketch

test

Debug Message

test

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions