Copyright © https://mongoose-os.com

Mongoose OS Forum

frame

Problem with porting LiquidCrystal_I2C library on ESP32 (send macro)

I'm working on LiquidCrystal_I2C library for mos and now I'm testing it on ESP8266 (working fine), BUT there is a problem with compiling it for ESP32: on ESP32 there's a macro called send so I can't declare method send on LiquidCrystal_I2C class. Errors like:

.../include/LiquidCrystal_I2C.h:114:29: error: macro "send" requires 4 arguments, but only 2 given
   void send(uint8_t, uint8_t);
.../build_ctx_130512010/src/LiquidCrystal_I2C.cpp:244:25: error: variable or field 'send' declared void
 void LiquidCrystal_I2C::send(uint8_t value, uint8_t mode) {

The only solution I found is to include in my libraries .h file:

#ifdef send
#undef send
#endif

Is there a way to make it more elegant to declare method send without using undef? Why is it only on ESP32 platform and what it is for?

P.S.
And I can't find anything about send macro on ESP32, so I think it's declared in MOS sources.

Comments

Sign In or Register to comment.