LoRaMac-node icon indicating copy to clipboard operation
LoRaMac-node copied to clipboard

Please consider making filenames and include guards in system/ more unique

Open tinic opened this issue 3 years ago • 0 comments

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.

tinic avatar Jan 28 '22 01:01 tinic