Perhaps this change may not be generally a good idea across different build environments, but it seems to solve my problem with including wfx_fmac_driver as a library in the Arduino IDE.
The problem is that some of the files in wfx_fmac_driver and wfx_fmac_driver/bus include header files from wfx_fmac_driver/firmware without specifying the firmware/ path prefix in #include "...".
As a consequence, the compiler needs to use an include search path with both wfx_fmac_driver and wfx_fmac_driver/firmware in order to locate all the necessary header files. As best I can tell, the Arduino IDE currently assumes that each library will only need one directory for its include search path.
For example, a library that needed the equivalent of this would work okay:
gcc ... -I wfx_fmac_driver ...
But, the Arduino IDE apparently cannot cope with a situation that needs something like this:
gcc ... -I wfx_fmac_driver -I wfx_fmac_driver/firmware ...
This pull request attempts to solve the problem by making the following replacements:
Perhaps this change may not be generally a good idea across different build environments, but it seems to solve my problem with including
wfx_fmac_driver
as a library in the Arduino IDE.The problem is that some of the files in
wfx_fmac_driver
andwfx_fmac_driver/bus
include header files fromwfx_fmac_driver/firmware
without specifying thefirmware/
path prefix in#include "..."
.As a consequence, the compiler needs to use an include search path with both
wfx_fmac_driver
andwfx_fmac_driver/firmware
in order to locate all the necessary header files. As best I can tell, the Arduino IDE currently assumes that each library will only need one directory for its include search path.For example, a library that needed the equivalent of this would work okay:
gcc ... -I wfx_fmac_driver ...
But, the Arduino IDE apparently cannot cope with a situation that needs something like this:gcc ... -I wfx_fmac_driver -I wfx_fmac_driver/firmware ...
This pull request attempts to solve the problem by making the following replacements:
#include "sl_wfx_registers.h"
becomes#include "firmware/sl_wfx_registers.h"
#include "sl_wfx_api.h"
becomes#include "firmware/sl_wfx_api.h"
For context on manually installing Arduino IDE libraries, see https://www.arduino.cc/en/Guide/Libraries#manual-installation. Please feel free to close this PR if it seems like a bad idea.