Where does PlatformIO store platform frameworks?

You are linking to the master version here, or rather the one that is currently being worked on as “2.0.0”, and your sketch also seems to be requiring it. However, core 2.0.0 has not been released as stable yet and PlatformIO is using, as documented here, the latest stable 1.0.6 version the core currently. And as you can see here, those enums do not exist in that version.

There are two possibilites:

  • Rewrite your sketch to work with the latest stable release 1.0.6 instead of the 2.0.0 current development version of Arduino-ESP32
  • Tell PlatformIO to use that bleeding-edge 2.0.0 core. Results and correctness not guaranteed as beta versions are not officially supported.

As documented, PlatformIO stores the framework in a package, framework-arduinoespressif32 in the Arduino-ESP32 case, which is located in <home folder>\.platformio\packages on the harddrive.