TeensyWolf
Well-known member
#include <SdFat.h>
#include <USBHost_t36.h>
Above is my include files - but I'm working on reading and writing to USB and SD Card. I haven't written the code yet, but it's throwing a warning that FILE_READ & FILE_WRITE are being redefined - which could be bad. Is there a workaround?
Compiling .pio/build/teensy41/src/sdUsbDrive.cpp.o
In file included from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/USBHost_t36/USBHost_t36.h:28,
from src/sdUsbDrive.cpp:5:
/Users/twolfe/.platformio/packages/framework-arduinoteensy/cores/teensy4/FS.h:37: warning: "FILE_READ" redefined
37 | #define FILE_READ 0
|
In file included from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/ExFatLib/ExFatFile.h:821,
from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/ExFatLib/ExFatVolume.h:27,
from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/ExFatLib/ExFatLib.h:27,
from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/SdFat.h:35,
from src/sdUsbDrive.cpp:1:
/Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/ExFatLib/../common/ArduinoFiles.h:31: note: this is the location of the previous definition
31 | #define FILE_READ O_RDONLY
|
In file included from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/USBHost_t36/USBHost_t36.h:28,
from src/sdUsbDrive.cpp:5:
/Users/twolfe/.platformio/packages/framework-arduinoteensy/cores/teensy4/FS.h:38: warning: "FILE_WRITE" redefined
38 | #define FILE_WRITE 1
|
In file included from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/ExFatLib/ExFatFile.h:821,
from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/ExFatLib/ExFatVolume.h:27,
from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/ExFatLib/ExFatLib.h:27,
from /Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/SdFat.h:35,
from src/sdUsbDrive.cpp:1:
/Users/twolfe/.platformio/packages/framework-arduinoteensy/libraries/SdFat/src/ExFatLib/../common/ArduinoFiles.h:35: note: this is the location of the previous definition
35 | #define FILE_WRITE (O_RDWR | O_CREAT | O_AT_END)