mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
fd9a247200
Creating an `exti_config` array for a new MCU manually is tedious and error prone. Luckiely all information is already availiable in the vendor files. Credit for this discovery & method goes to @Sizurka The file was generated with ```C int main(void) { puts("static const int8_t exti_config[PORT_GROUPS][32] = {"); for (unsigned port = 1; port < 5; ++port) { printf("#if PORT_GROUPS >= %d\n{\n", port); for (unsigned pin = 0; pin < 32; ++pin) { printf("#ifdef PIN_P%c%02uA_EIC_EXTINT_NUM\n", '@' + port, pin); printf(" PIN_P%c%02uA_EIC_EXTINT_NUM,\n", '@' + port, pin); printf("#else\n -1,\n#endif\n"); } printf("},\n#endif\n\n"); } puts("};"); return 0; } ``` No changes in generated code are expected, but this makes adding new members of the sam0 CPU families much easier. |
||
---|---|---|
.. | ||
include | ||
periph | ||
cpu.c | ||
doc.txt | ||
Makefile | ||
Makefile.dep | ||
Makefile.features | ||
Makefile.include | ||
vectors.c |