Espressif SPI and GPIO expander

Why can't you compile your existing code in C++? If necessary, you can use the directive:

extern "C" {