diff --git a/cpu/kinetis_common/Makefile b/cpu/kinetis_common/Makefile index 587f1a4038..503d148876 100644 --- a/cpu/kinetis_common/Makefile +++ b/cpu/kinetis_common/Makefile @@ -1,4 +1,6 @@ # define the module that is build MODULE = kinetis_common +DIRS += periph + include $(RIOTBASE)/Makefile.base diff --git a/cpu/kinetis_common/periph/Makefile b/cpu/kinetis_common/periph/Makefile new file mode 100644 index 0000000000..6d1887b640 --- /dev/null +++ b/cpu/kinetis_common/periph/Makefile @@ -0,0 +1,3 @@ +MODULE = periph + +include $(RIOTBASE)/Makefile.base diff --git a/cpu/kinetis_common/adc.c b/cpu/kinetis_common/periph/adc.c similarity index 100% rename from cpu/kinetis_common/adc.c rename to cpu/kinetis_common/periph/adc.c diff --git a/cpu/kinetis_common/cpuid.c b/cpu/kinetis_common/periph/cpuid.c similarity index 100% rename from cpu/kinetis_common/cpuid.c rename to cpu/kinetis_common/periph/cpuid.c diff --git a/cpu/kinetis_common/gpio.c b/cpu/kinetis_common/periph/gpio.c similarity index 100% rename from cpu/kinetis_common/gpio.c rename to cpu/kinetis_common/periph/gpio.c index 6407fd6c64..e612d7c482 100644 --- a/cpu/kinetis_common/gpio.c +++ b/cpu/kinetis_common/periph/gpio.c @@ -326,12 +326,12 @@ void gpio_irq_enable(gpio_t dev) mutex_lock(&int_config_lock); /* Search for the given pin in the port's interrupt configuration */ LL_SEARCH_SCALAR(gpio_interrupts[_port_num(dev)], entry, pin, pin_number); - uint32_t irqc = entry->irqc; mutex_unlock(&int_config_lock); if (entry == NULL) { /* Pin has not been configured for interrupts */ return; } + uint32_t irqc = entry->irqc; port->PCR[pin_number] &= ~(PORT_PCR_IRQC_MASK); port->PCR[pin_number] |= irqc; } diff --git a/cpu/kinetis_common/i2c.c b/cpu/kinetis_common/periph/i2c.c similarity index 100% rename from cpu/kinetis_common/i2c.c rename to cpu/kinetis_common/periph/i2c.c diff --git a/cpu/kinetis_common/mcg.c b/cpu/kinetis_common/periph/mcg.c similarity index 100% rename from cpu/kinetis_common/mcg.c rename to cpu/kinetis_common/periph/mcg.c diff --git a/cpu/kinetis_common/pwm.c b/cpu/kinetis_common/periph/pwm.c similarity index 100% rename from cpu/kinetis_common/pwm.c rename to cpu/kinetis_common/periph/pwm.c diff --git a/cpu/kinetis_common/random_rnga.c b/cpu/kinetis_common/periph/random_rnga.c similarity index 100% rename from cpu/kinetis_common/random_rnga.c rename to cpu/kinetis_common/periph/random_rnga.c diff --git a/cpu/kinetis_common/random_rngb.c b/cpu/kinetis_common/periph/random_rngb.c similarity index 100% rename from cpu/kinetis_common/random_rngb.c rename to cpu/kinetis_common/periph/random_rngb.c diff --git a/cpu/kinetis_common/rtc.c b/cpu/kinetis_common/periph/rtc.c similarity index 100% rename from cpu/kinetis_common/rtc.c rename to cpu/kinetis_common/periph/rtc.c diff --git a/cpu/kinetis_common/rtt.c b/cpu/kinetis_common/periph/rtt.c similarity index 100% rename from cpu/kinetis_common/rtt.c rename to cpu/kinetis_common/periph/rtt.c diff --git a/cpu/kinetis_common/spi.c b/cpu/kinetis_common/periph/spi.c similarity index 100% rename from cpu/kinetis_common/spi.c rename to cpu/kinetis_common/periph/spi.c diff --git a/cpu/kinetis_common/timer.c b/cpu/kinetis_common/periph/timer.c similarity index 100% rename from cpu/kinetis_common/timer.c rename to cpu/kinetis_common/periph/timer.c diff --git a/cpu/kinetis_common/uart.c b/cpu/kinetis_common/periph/uart.c similarity index 100% rename from cpu/kinetis_common/uart.c rename to cpu/kinetis_common/periph/uart.c diff --git a/cpu/kinetis_common/wdog.c b/cpu/kinetis_common/periph/wdog.c similarity index 100% rename from cpu/kinetis_common/wdog.c rename to cpu/kinetis_common/periph/wdog.c