1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/sam0_common
Benjamin Valentin fd9a247200 cpu/sam0_common: use generic exti_config
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.
2020-02-20 11:23:51 +01:00
..
include cpu/sam0_common: use generic exti_config 2020-02-20 11:23:51 +01:00
ldscripts sam0_common: Adjust ldscript memory segment attributes 2018-05-09 06:49:02 +02:00
periph Merge pull request #13271 from kfessel/patch-shed 2020-02-05 14:44:08 +01:00
doc.txt cpu/sam0: update doc.txt with new MCU families 2019-07-17 11:37:46 +02:00
Makefile cpu/sam0: renamed sam21_common to sam0_common 2016-12-15 11:47:03 +01:00
Makefile.dep cpu/sam0: factorize dependencies in Makefile.dep 2020-01-28 13:18:39 +01:00
Makefile.features cpu/sam0_common/periph/uart: implement buffered write 2019-11-27 19:01:00 +01:00
Makefile.include cpu/sam0_common: use vendor files to dispatch MCU headers 2020-02-06 19:52:05 +01:00