1 year, 9 months ago.

FATFileSYSTEM disturbs with SPI write function of mbed os

Hello. I have a project using the SDCard library (SDFileSystem) and a personal library that interacts with a sensor through spi. The examples using each library work well apart, but when imported into the same project on mbed online compiler, there's a problem with the spi write function! the compiler detects the spi write function as a function of FATFILEHADLER and not of SPI in my homemade library/media/uploads/ryudas/screen_shot_2019-09-09_at_4.35.41_pm.png /media/uploads/ryudas/screen_shot_2019-09-09_at_4.35.56_pm.png

! I do not know how to fix this?

1 Answer

1 year, 9 months ago.

Where and how are you defining m_SPI? Have you tried using a class label to force the compiler to only look at your class? Something along the lines of MySpecialLib::m_SPI.write(...etc..

Where MySpecialLib is the name of your class with the m_SPI method.

m_SPI is a member attribute of my sensor object. in the constructor mSPI is created like so: /media/uploads/ryudas/screen_shot_2019-09-10_at_9.08.35_am.png

posted by john mayer 10 Sep 2019