acronis wrote: ↑Wed Aug 02, 2017 8:37 am
Hello.
If you #include
SD card (SDIO) the error appears.
Code: Select all
#include
#include
#include "SdioF4.h"
SdFatSdio sd;
File file;
In file included from C:\Users\Admin\Documents\Arduino\libraries\SdFat\src/BlockDriver.h:27:0,
from C:\Users\Admin\Documents\Arduino\libraries\SdFat\src/SdFat.h:27,
from C:\Users\Admin\Documents\Arduino\hardware\Arduino_STM32-master\STM32F4\libraries\SDIO/SdioF4.h:5,
from C:\Users\Admin\Desktop\STM32F4\RFIDRTOS\RFIDRTOS.ino:12:
C:\Users\Admin\Documents\Arduino\libraries\SdFat\src/SdCard/SdSpiCard.h:264:51: error: macro "writeData" passed 2 arguments, but takes just 1
without FreeRTOS everything works.
Tell me how to fix this error
The error is not related to FreeRTOS.
For some reason you are including the SDIO files, which have an implementation of writeData taking 1 parameter only:
https://github.com/stevstrong/Arduino_S ... 4.cpp#L751
But also including sdspicard.h, which is for using the SPI port instead of the SDIO, and takes 2 parameters:
https://github.com/greiman/SdFat/blob/m ... ard.h#L264
Please check where sdspicard.h is included from.
to be clear, an SDcard can work on either SPI more or SDIO mode.
Depending which mode you want to use, you need to include the SPI implementation, or the SDIO implementation of SDFat.
I can't imagine why you get that error only if you include FreeRTOS, FreeRTOS does not include any part of SdFat.