This is effectively a fork of the U8G2 code that is part of Neil Kolban's excellent esp32-snippets repository. It can be found here. His repository is no longer maintained and using a single directory ...
static spi_device_handle_t handle_spi; // SPI handle. static i2c_cmd_handle_t handle_i2c; // I2C handle. static u8g2_esp32_hal_t u8g2_esp32_hal; // HAL state data. # ...