LoRaMac-node
LoRaMac-node copied to clipboard
Please consider making filenames and include guards in system/ more unique
Running into a problem now when porting to a new MCU architecture (Nuvoton M484) where the vendor CMSIS headers clash with filenames and include guards in LoRaMac-node/src/system/*. Specifically these filenames are a little to generic:
gpio.c/.h timer.c/.h uart.c/.h i2c.c/.h etc.
This is likely also an issue with other MCU platforms like GigaDevice and ATSAM.
Right now my workaround is to change all include guards in system/*.h as such:
GPIO_H -> SEMTECH_GPIO_H
To handle include clashes I replaced all include directives as such:
#include "gpio.h" -> #include "system/gpio.h"
That way I guarantee uniqueness and pull in the right include.