Invalid conversion when making a function that passes parameters to digitalWrite

From Arduino/Arduino.h at 2.3.0 · esp8266/Arduino · GitHub

#define HIGH 0x1
#define LOW 0x0

The line:

#include <Arduino.h>

is automatically added to your .ino file by the Arduino IDE before compilation.