mbed-ce / mbed-os

Arm Mbed OS is a platform operating system designed for the internet of things

Home Page:https://mbed.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SPIFBlockDevice.h 'SPI' in namespace 'mbed' does not name a type

lefebvresam opened this issue · comments

When using:
mbed-os/storage/blockdevice/COMPONENT_SPIF/include/SPIF/SPIFBlockDevice.h

In file included from /home/sam/git/hmipanel/mbed-os/storage/blockdevice/COMPONENT_SPIF/source/SPIFBlockDevice.cpp:19:
/home/sam/git/hmipanel/mbed-os/storage/blockdevice/COMPONENT_SPIF/include/SPIF/SPIFBlockDevice.h:270:11: error: 'SPI' in namespace 'mbed' does not name a type
  270 |     mbed::SPI _spi;

and putting SPI in comment:

In file included from /home/sam/git/hmipanel/mbed-os/storage/blockdevice/COMPONENT_SPIF/source/SPIFBlockDevice.cpp:19:
/home/sam/git/hmipanel/mbed-os/storage/blockdevice/COMPONENT_SPIF/include/SPIF/SPIFBlockDevice.h:274:25: error: 'rtos' was not declared in this scope
  274 |     static SingletonPtr<rtos::Mutex> _mutex;

It was because SPIFBlockDevice makes use of SPI and it was diabled in "device_has_remove" config.