I ran into the following error when compiling a library called BurstSPI with VSCode’s PlatformIO. This error does not occur with the mbed online compiler. Please tell me why it happens. Please tell me how to use _spi.
BurstSPI
Error BurstSPI/BurstSPI_LPC_X.cpp:6:13: error: '_spi' was not declared in this scope
This project seems only can be built with Mbed 2, I would suggest you to remove the build_flag -D PIO_FRAMEWORK_MBED_RTOS_PRESENT to use Mbed 2, instead of Mbed OS 5.
You can also checking your project in online IDE, the lib mbed-os means Mbed OS 5, the lib mbed means Mbed 2.
BurstSPI pretty much removes the read back response from the connected device for instance an ‘ack’ which causes an unnecessary delay if MISO is not connected. Simply comment it out providing you are not using any other attached SPI devices that need MISO connected.
I haven’t tried it recently but used to work for me with LCD displays.
You can’t do this on the online compiler as we only have pre-built Mbed libraries.