code correct for Arduino UNO but not for NodeMCU 1.0


Any idea why my code compile without error on Arduino UNO and give me error with NodeMCU?


In file included from /home/simon/Arduino/libraries/DHTLib/dht.h:18:0,
from /home/simon/Arduino/libraries/DHTLib/dht.cpp:30:
/home/simon/Arduino/libraries/DHTLib/dht.cpp: In member function 'int dht::_readSensor(uint8_t, uint8_t)':
/home/simon/.arduino15/packages/esp8266/hardware/esp8266/2.2.0/cores/esp8266/Arduino.h:227:63: error: cannot convert 'volatile uint32_t* {aka volatile unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in initialization
#define portInputRegister(port) ((volatile uint32_t*) &GPI)
/home/simon/Arduino/libraries/DHTLib/dht.cpp:116:29: note: in expansion of macro 'portInputRegister'
volatile uint8_t *PIR = portInputRegister(port);

exit status 1
Erreur de compilation pour la carte NodeMCU 1.0 (ESP-12E Module)

It's because you're using code that is specific to the UNO in there. Or at least is specific to the AVR controllers.