SiliconLabs / wfx-fullMAC-driver

Silicon Laboratories WFx Wi-Fi Full-MAC driver
23 stars 9 forks source link

use "firmware/" prefix when including firmware/*.h #10

Closed samblenny closed 3 years ago

samblenny commented 3 years ago

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:

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.

silabs-JulienT commented 3 years ago

Hi Sam,

Thanks for the pull request. We will review it and let you know if we see any issue with integrating it.

Regards, Julien