Hi,
I have ported microchip's cryptoauthlib to be used with an ATMEGA2560. The Lib implements a HAL interface for either i2c or SWI. I have implemented a SWI. In my implementation within the lib I need to define the SWI pin, port etc...
#define SWI_PORT PORTC #define SWI_INPUT_PIN PINC #define SWI_DDR DDRC #define SWI_PIN PC0
This is currently defined within the "{path}\Arduino\libraries\cryptoauthlibmega\hal_swi_bitbang.c". I have 2 options that I know of, keep this defines within the library, but this makes it a pain to change. I could also define it in "platform.local.txt".
Is there any other way to define it in the .ino file where the compiler will recognize it in my library?