diff --git a/configs/Kconfig b/configs/Kconfig index 74896c8aa52..b35859bb8ca 100644 --- a/configs/Kconfig +++ b/configs/Kconfig @@ -223,7 +223,7 @@ config ARCH_BOARD_FLIPNCLICK_SAM3X config ARCH_BOARD_FREEDOM_K28F bool "NXP Freedom-k28f development board" depends on ARCH_CHIP_MK28FN2M0VMI15 - select ARCH_HAVE_LEDS + select ARCH_HAVE_LEDS if !RGBLED select ARCH_HAVE_BUTTONS select ARCH_HAVE_IRQBUTTONS ---help--- diff --git a/configs/freedom-k28f/src/Makefile b/configs/freedom-k28f/src/Makefile index 143b7ff361a..5d0cd26755c 100644 --- a/configs/freedom-k28f/src/Makefile +++ b/configs/freedom-k28f/src/Makefile @@ -38,21 +38,26 @@ ASRCS = CSRCS = k28_boot.c k28_bringup.c k28_spi.c k28_i2c.c +ifeq ($(CONFIG_LIB_BOARDCTL),y) +CSRCS += k28_appinit.c +endif + +# If the RGB driver is not enabled, then treat the RGB as 3 LEDs + +ifneq ($(CONFIG_RGBLED),y) ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += k28_autoleds.c else CSRCS += k28_userleds.c endif -ifeq ($(CONFIG_KINETIS_USBOTG),y) -CSRCS += k28_usbdev.c -endif - -ifeq ($(CONFIG_LIB_BOARDCTL),y) -CSRCS += k28_appinit.c endif ifeq ($(CONFIG_PWM),y) CSRCS += k28_pwm.c endif +ifeq ($(CONFIG_KINETIS_USBOTG),y) +CSRCS += k28_usbdev.c +endif + include $(TOPDIR)/configs/Board.mk