Revert F() and move char* to FlashStringHelper

This commit is contained in:
fvanroie 2023-05-12 14:11:05 +02:00
parent 6ccd10dbe0
commit 894a6657d7

View File

@ -19,21 +19,11 @@
namespace dev { namespace dev {
// void tftPinInfo(const __FlashStringHelper* pinfunction, int8_t pin) void tftPinInfo(const __FlashStringHelper* pinfunction, int8_t pin)
// {
// if(pin != -1) {
// char buffer[64];
// snprintf_P(buffer, sizeof(buffer), PSTR("%-12s: %s (GPIO %02d)"), String(pinfunction).c_str(),
// haspDevice.gpio_name(pin).c_str(), pin);
// LOG_VERBOSE(TAG_TFT, buffer);
// }
// }
void tftPinInfo(const char* pinfunction, int8_t pin)
{ {
if(pin != -1) { if(pin != -1) {
char buffer[64]; char buffer[64];
snprintf_P(buffer, sizeof(buffer), PSTR("%-12s: %s (GPIO %02d)"), pinfunction, snprintf_P(buffer, sizeof(buffer), PSTR("%-12s: %s (GPIO %02d)"), String(pinfunction).c_str(),
haspDevice.gpio_name(pin).c_str(), pin); haspDevice.gpio_name(pin).c_str(), pin);
LOG_VERBOSE(TAG_TFT, buffer); LOG_VERBOSE(TAG_TFT, buffer);
} }