diff --git a/bsp/lpc55sxx/Libraries/drivers/SConscript b/bsp/lpc55sxx/Libraries/drivers/SConscript index 892b3e6201..e5714da749 100644 --- a/bsp/lpc55sxx/Libraries/drivers/SConscript +++ b/bsp/lpc55sxx/Libraries/drivers/SConscript @@ -7,12 +7,6 @@ src = [] if GetDepend('BSP_USING_PIN'): src += ['drv_pin.c'] -if GetDepend('BSP_USING_LED'): - src += ['drv_led.c'] - -if GetDepend('BSP_USING_KEY'): - src += ['drv_key.c'] - if GetDepend('BSP_USING_UART'): src += ['drv_uart.c'] diff --git a/bsp/lpc55sxx/Libraries/drivers/drv_key.c b/bsp/lpc55sxx/Libraries/drivers/drv_key.c deleted file mode 100644 index 16b7f19ecc..0000000000 --- a/bsp/lpc55sxx/Libraries/drivers/drv_key.c +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) 2006-2023, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2019-07-19 Magicoe The first version for LPC55S6x, refered github.com/Guozhanxin/RTT-BeepPlayer-pkg - */ - -#include - -#include "rtconfig.h" - -#include "fsl_common.h" -#include "fsl_iocon.h" -#include "fsl_gpio.h" -#include "fsl_inputmux.h" -#include "drv_key.h" - -/**** Debug ****/ -#define DBG_ENABLE -#define DBG_SECTION_NAME "button" -#define DBG_LEVEL DBG_INFO -#define DBG_COLOR -#include - -#define MY_BUTTON_CALL(func, argv) \ - do { if ((func) != RT_NULL) func argv; } while (0) - -struct my_button_manage -{ - rt_uint8_t num; - rt_timer_t timer; - struct my_button *button_list[MY_BUTTON_LIST_MAX]; -}; - -static struct my_button_manage button_manage; - -int my_button_register(struct my_button *button) -{ - if (button->press_logic_level == 0) - { - rt_pin_mode(button->pin, PIN_MODE_INPUT_PULLUP); - } - else - { - rt_pin_mode(button->pin, PIN_MODE_INPUT_PULLDOWN); - } - - button->cnt = 0; - button->event = BUTTON_EVENT_NONE; - button_manage.button_list[button_manage.num++] = button; - - return 0; -} - -static void my_button_scan(void *param) -{ - rt_uint8_t i; - rt_uint16_t cnt_old; - - for (i = 0; i < button_manage.num; i++) - { - cnt_old = button_manage.button_list[i]->cnt; - - if (rt_pin_read(button_manage.button_list[i]->pin) == button_manage.button_list[i]->press_logic_level) - { - button_manage.button_list[i]->cnt ++; - - if (button_manage.button_list[i]->cnt == MY_BUTTON_DOWN_MS / MY_BUTTON_SCAN_SPACE_MS) /* BUTTON_DOWN */ - { - LOG_D("BUTTON_DOWN"); - button_manage.button_list[i]->event = BUTTON_EVENT_CLICK_DOWN; - MY_BUTTON_CALL(button_manage.button_list[i]->cb, (button_manage.button_list[i])); - } - else if (button_manage.button_list[i]->cnt == MY_BUTTON_HOLD_MS / MY_BUTTON_SCAN_SPACE_MS) /* BUTTON_HOLD */ - { - LOG_D("BUTTON_HOLD"); - button_manage.button_list[i]->event = BUTTON_EVENT_HOLD; - MY_BUTTON_CALL(button_manage.button_list[i]->cb, (button_manage.button_list[i])); - } - else if (button_manage.button_list[i]->cnt > MY_BUTTON_HOLD_MS / MY_BUTTON_SCAN_SPACE_MS) /* BUTTON_HOLD_CYC */ - { - LOG_D("BUTTON_HOLD_CYC"); - button_manage.button_list[i]->event = BUTTON_EVENT_HOLD_CYC; - if (button_manage.button_list[i]->hold_cyc_period && button_manage.button_list[i]->cnt % (button_manage.button_list[i]->hold_cyc_period / MY_BUTTON_SCAN_SPACE_MS) == 0) - MY_BUTTON_CALL(button_manage.button_list[i]->cb, (button_manage.button_list[i])); - } - } - else - { - button_manage.button_list[i]->cnt = 0; - if (cnt_old >= MY_BUTTON_DOWN_MS / MY_BUTTON_SCAN_SPACE_MS && cnt_old < MY_BUTTON_HOLD_MS / MY_BUTTON_SCAN_SPACE_MS) /* BUTTON_CLICK_UP */ - { - LOG_D("BUTTON_CLICK_UP"); - button_manage.button_list[i]->event = BUTTON_EVENT_CLICK_UP; - MY_BUTTON_CALL(button_manage.button_list[i]->cb, (button_manage.button_list[i])); - } - else if (cnt_old >= MY_BUTTON_HOLD_MS / MY_BUTTON_SCAN_SPACE_MS) /* BUTTON_HOLD_UP */ - { - LOG_D("BUTTON_HOLD_UP"); - button_manage.button_list[i]->event = BUTTON_EVENT_HOLD_UP; - MY_BUTTON_CALL(button_manage.button_list[i]->cb, (button_manage.button_list[i])); - } - } - } -} - -int my_button_start(void) -{ - if (button_manage.timer != RT_NULL) - return -1; - - /* Create Timer 1 */ - button_manage.timer = rt_timer_create("timer1", /* Timer name is: timer1 */ - my_button_scan, /* Timeout callback func */ - RT_NULL, /* Timeout func entry */ - RT_TICK_PER_SECOND * MY_BUTTON_SCAN_SPACE_MS / 1000, - RT_TIMER_FLAG_PERIODIC | RT_TIMER_FLAG_SOFT_TIMER); - /* Start Timer */ - if (button_manage.timer != RT_NULL) - rt_timer_start(button_manage.timer); - - return 0; -} - -#ifdef RT_USING_FINSH -#include - -#ifdef FINSH_USING_MSH - -#define KEY_PIN 51 -#define KEY_PRESS_VALUE 0 - -void key_cb(struct my_button *button) -{ - switch (button->event) - { - case BUTTON_EVENT_CLICK_UP: - rt_kprintf("This is click up callback!\n"); - break; - case BUTTON_EVENT_HOLD_CYC: - rt_kprintf("This is hold cyc callback!\n"); - break; - default: - ; - } -} - -void key_test(rt_uint32_t led_num, rt_uint32_t value) -{ - /* user app entry */ - static struct my_button key = {0}; - - key.press_logic_level = KEY_PRESS_VALUE; - key.hold_cyc_period = 100; - key.cb = (my_button_callback)key_cb; - key.pin = KEY_PIN; - - my_button_register(&key); - - my_button_start(); -} -MSH_CMD_EXPORT(key_test, key_test); - -#endif /* FINSH_USING_MSH */ -#endif /* RT_USING_FINSH */ diff --git a/bsp/lpc55sxx/Libraries/drivers/drv_key.h b/bsp/lpc55sxx/Libraries/drivers/drv_key.h deleted file mode 100644 index 259e31c23c..0000000000 --- a/bsp/lpc55sxx/Libraries/drivers/drv_key.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright (c) 2006-2023, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2019-07-19 Magicoe The first version for LPC55S6x, refered github.com/Guozhanxin/RTT-BeepPlayer-pkg - */ - -#ifndef __DRV_KEY_H__ -#define __DRV_KEY_H__ - -#include -#include - -#define MY_BUTTON_DOWN_MS 50 -#define MY_BUTTON_HOLD_MS 700 - -#define MY_BUTTON_SCAN_SPACE_MS 20 -#define MY_BUTTON_LIST_MAX 10 - -typedef void (*my_button_callback)(void*); - -enum my_button_event -{ - BUTTON_EVENT_CLICK_DOWN, - BUTTON_EVENT_CLICK_UP, - BUTTON_EVENT_HOLD, - BUTTON_EVENT_HOLD_CYC, - BUTTON_EVENT_HOLD_UP, - BUTTON_EVENT_NONE -}; - -struct my_button -{ - rt_uint8_t press_logic_level; - rt_uint16_t cnt; - rt_uint16_t hold_cyc_period; - rt_uint16_t pin; - - enum my_button_event event; - - my_button_callback cb; -}; - -int my_button_register(struct my_button *button); -int my_button_start(void); - - -#endif diff --git a/bsp/lpc55sxx/Libraries/drivers/drv_led.c b/bsp/lpc55sxx/Libraries/drivers/drv_led.c deleted file mode 100644 index 9410d5fa00..0000000000 --- a/bsp/lpc55sxx/Libraries/drivers/drv_led.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2006-2023, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2019-07-19 Magicoe The first version for LPC55S6x - */ - -#include - -#include "rtconfig.h" - -#include "fsl_common.h" -#include "fsl_iocon.h" -#include "fsl_gpio.h" -#include "fsl_inputmux.h" - -#define LED_DEVICE_CTRL 0x81 /*LED control command*/ - -#define LED_NUM 2 - -struct led_ctrl -{ - uint8_t port; - uint32_t pin; -}; - -struct lpc_led -{ - /* inherit from rt_device */ - struct rt_device parent; - - struct led_ctrl ctrl[LED_NUM]; -}; - -static struct lpc_led led; - -static rt_err_t rt_led_init(rt_device_t dev) -{ - gpio_pin_config_t pin_config = {kGPIO_DigitalOutput, 1}; - - GPIO_PinInit(GPIO, 1, 7, &pin_config); - GPIO_PinInit(GPIO, 1, 6, &pin_config); - - led.ctrl[0].pin = 7; - led.ctrl[0].port = 1; - led.ctrl[1].pin = 6; - led.ctrl[1].port = 1; - - return RT_EOK; -} - -static rt_err_t rt_led_open(rt_device_t dev, rt_uint16_t oflag) -{ - return RT_EOK; -} - -static rt_err_t rt_led_close(rt_device_t dev) -{ - return RT_EOK; -} - -static rt_ssize_t rt_led_read(rt_device_t dev, rt_off_t pos, void *buffer, - rt_size_t size) -{ - rt_ubase_t index = 0; - rt_ubase_t nr = size; - rt_uint8_t *value = buffer; - - RT_ASSERT(dev == &led.parent); - RT_ASSERT((pos + size) <= LED_NUM); - - for (index = 0; index < nr; index++) - { - if(GPIO_PinRead(GPIO, led.ctrl[pos + index].port, led.ctrl[pos + index].pin) == 0) - { - *value = 0; - } - else - { - *value = 1; - } - value++; - } - return index; -} - -static rt_ssize_t rt_led_write(rt_device_t dev, rt_off_t pos, - const void *buffer, rt_size_t size) -{ - rt_ubase_t index = 0; - rt_ubase_t nw = size; - const rt_uint8_t *value = buffer; - - RT_ASSERT(dev == &led.parent); - RT_ASSERT((pos + size) <= LED_NUM); - - for (index = 0; index < nw; index++) - { - if (*value++) - { - GPIO_PinWrite(GPIO, led.ctrl[pos + index].port, led.ctrl[pos + index].pin, 0); - } - else - { - GPIO_PinWrite(GPIO, led.ctrl[pos + index].port, led.ctrl[pos + index].pin, 1); - } - } - return index; -} - -static rt_err_t rt_led_control(rt_device_t dev, int cmd, void *args) -{ - RT_ASSERT(dev == &led.parent); - - if (cmd == LED_DEVICE_CTRL) - { - rt_uint32_t *led_num = args; - *led_num = LED_NUM; - } - return RT_EOK; -} - -int rt_hw_led_init(void) -{ - led.parent.type = RT_Device_Class_Char; - led.parent.rx_indicate = RT_NULL; - led.parent.tx_complete = RT_NULL; - led.parent.init = rt_led_init; - led.parent.open = rt_led_open; - led.parent.close = rt_led_close; - led.parent.read = rt_led_read; - led.parent.write = rt_led_write; - led.parent.control = rt_led_control; - led.parent.user_data = RT_NULL; - - /* register a character device */ - rt_device_register(&led.parent, "led", RT_DEVICE_FLAG_RDWR); - /* init led device */ - rt_led_init(&led.parent); - return 0; -} - -INIT_DEVICE_EXPORT(rt_hw_led_init); - -#ifdef RT_USING_FINSH -#include -#include "msh.h" - -void led_test(rt_uint32_t led_num, rt_uint32_t value) -{ - rt_uint8_t led_value = value; - - rt_led_write(&led.parent, led_num, &led_value, 1); -} -FINSH_FUNCTION_EXPORT(led_test, e.g: led_test(0, 1).); - -#endif diff --git a/bsp/lpc55sxx/Libraries/drivers/drv_led.h b/bsp/lpc55sxx/Libraries/drivers/drv_led.h deleted file mode 100644 index c00869b86b..0000000000 --- a/bsp/lpc55sxx/Libraries/drivers/drv_led.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2006-2023, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2019-07-19 Magicoe The first version for LPC55S6x - */ - -#ifndef __DRV_LED_H__ -#define __DRV_LED_H__ - -#include -#include - -int rt_hw_led_init(void); - -#endif diff --git a/bsp/lpc55sxx/lpc55s06_nxp_evk/board/Kconfig b/bsp/lpc55sxx/lpc55s06_nxp_evk/board/Kconfig index 67523a4f5a..74bdcb8a94 100644 --- a/bsp/lpc55sxx/lpc55s06_nxp_evk/board/Kconfig +++ b/bsp/lpc55sxx/lpc55s06_nxp_evk/board/Kconfig @@ -64,12 +64,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C bool "Enable I2C" select RT_USING_I2C - default y + default n if BSP_USING_I2C config BSP_USING_I2C1 bool "Enable Flexcomm1 I2C" - default y + default n if BSP_USING_I2C1 choice prompt "Select I2C1 badurate" @@ -85,7 +85,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C4 bool "Enable Flexcomm4 I2C" - default y + default n if BSP_USING_I2C4 choice prompt "Select I2C4 badurate" @@ -104,7 +104,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI bool "Enable SPI" select RT_USING_SPI - default y + default n if BSP_USING_SPI config BSP_USING_SPI3 @@ -113,19 +113,19 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI8 bool "Enable Flexcomm8 as High Speed SPI" - default y + default n endif menuconfig BSP_USING_ADC config BSP_USING_ADC bool "Enable ADC Channel" select RT_USING_ADC - default y + default n if BSP_USING_ADC config BSP_USING_ADC0_CH0 bool "Enable ADC0 Channel0" - default y + default n config BSP_USING_ADC0_CH1 bool "Enable ADC0 Channel1" @@ -137,12 +137,12 @@ menu "On-chip Peripheral Drivers" select RT_USING_SDIO select RT_USING_DFS select RT_USING_DFS_ELMFAT - default y + default n config BSP_USING_RTC bool "Enable RTC" select RT_USING_RTC - default y + default n config BSP_USING_WDT bool "Enable WatchDog" @@ -153,12 +153,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_HWTIMER bool "Enable Timer" select RT_USING_HWTIMER - default y + default n if BSP_USING_HWTIMER config BSP_USING_CTIMER0 bool "Enable CIMER0" - default y + default n config BSP_USING_CTIMER1 bool "Enable CIMER1" @@ -177,12 +177,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_PWM bool "Enable PWM" select RT_USING_PWM - default y + default n if BSP_USING_PWM config BSP_USING_CTIMER2_MAT0 bool "Enable CIMER2 Match0 as PWM output" - default y + default n config BSP_USING_CTIMER2_MAT1 bool "Enable CIMER2 Match1 as PWM output" @@ -195,20 +195,10 @@ menu "On-chip Peripheral Drivers" endmenu menu "Onboard Peripheral Drivers" - config BSP_USING_LED - bool "Enable RGB LED" - select RT_USING_LED - default y - - config BSP_USING_KEY - bool "Enable Button " - select RT_USING_KEY - default y - config BSP_USING_MMA8562 bool "Enable MMA8562" select BSP_USING_I2C4 - default y + default n if BSP_USING_MMA8562 config BSP_USING_MMA8562I2C string "the device name for 3-Axis Sensor" diff --git a/bsp/lpc55sxx/lpc55s16_nxp_evk/board/Kconfig b/bsp/lpc55sxx/lpc55s16_nxp_evk/board/Kconfig index 0e76d2466a..fb85eb0a80 100644 --- a/bsp/lpc55sxx/lpc55s16_nxp_evk/board/Kconfig +++ b/bsp/lpc55sxx/lpc55s16_nxp_evk/board/Kconfig @@ -64,12 +64,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C bool "Enable I2C" select RT_USING_I2C - default y + default n if BSP_USING_I2C config BSP_USING_I2C1 bool "Enable Flexcomm1 I2C" - default y + default n if BSP_USING_I2C1 choice prompt "Select I2C1 badurate" @@ -85,7 +85,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C4 bool "Enable Flexcomm4 I2C" - default y + default n if BSP_USING_I2C4 choice prompt "Select I2C4 badurate" @@ -104,7 +104,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI bool "Enable SPI" select RT_USING_SPI - default y + default n if BSP_USING_SPI config BSP_USING_SPI3 @@ -113,19 +113,19 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI8 bool "Enable Flexcomm8 as High Speed SPI" - default y + default n endif menuconfig BSP_USING_ADC config BSP_USING_ADC bool "Enable ADC Channel" select RT_USING_ADC - default y + default n if BSP_USING_ADC config BSP_USING_ADC0_CH0 bool "Enable ADC0 Channel0" - default y + default n config BSP_USING_ADC0_CH1 bool "Enable ADC0 Channel1" @@ -137,12 +137,12 @@ menu "On-chip Peripheral Drivers" select RT_USING_SDIO select RT_USING_DFS select RT_USING_DFS_ELMFAT - default y + default n config BSP_USING_RTC bool "Enable RTC" select RT_USING_RTC - default y + default n config BSP_USING_WDT bool "Enable WatchDog" @@ -153,12 +153,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_HWTIMER bool "Enable Timer" select RT_USING_HWTIMER - default y + default n if BSP_USING_HWTIMER config BSP_USING_CTIMER0 bool "Enable CIMER0" - default y + default n config BSP_USING_CTIMER1 bool "Enable CIMER1" @@ -177,12 +177,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_PWM bool "Enable PWM" select RT_USING_PWM - default y + default n if BSP_USING_PWM config BSP_USING_CTIMER2_MAT0 bool "Enable CIMER2 Match0 as PWM output" - default y + default n config BSP_USING_CTIMER2_MAT1 bool "Enable CIMER2 Match1 as PWM output" @@ -195,20 +195,10 @@ menu "On-chip Peripheral Drivers" endmenu menu "Onboard Peripheral Drivers" - config BSP_USING_LED - bool "Enable RGB LED" - select RT_USING_LED - default y - - config BSP_USING_KEY - bool "Enable Button " - select RT_USING_KEY - default y - config BSP_USING_MMA8562 bool "Enable MMA8562" select BSP_USING_I2C4 - default y + default n if BSP_USING_MMA8562 config BSP_USING_MMA8562I2C string "the device name for 3-Axis Sensor" diff --git a/bsp/lpc55sxx/lpc55s28_nxp_evk/board/Kconfig b/bsp/lpc55sxx/lpc55s28_nxp_evk/board/Kconfig index 7f535ecf39..4e80e5ec15 100644 --- a/bsp/lpc55sxx/lpc55s28_nxp_evk/board/Kconfig +++ b/bsp/lpc55sxx/lpc55s28_nxp_evk/board/Kconfig @@ -64,12 +64,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C bool "Enable I2C" select RT_USING_I2C - default y + default n if BSP_USING_I2C config BSP_USING_I2C1 bool "Enable Flexcomm1 I2C" - default y + default n if BSP_USING_I2C1 choice prompt "Select I2C1 badurate" @@ -85,7 +85,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C4 bool "Enable Flexcomm4 I2C" - default y + default n if BSP_USING_I2C4 choice prompt "Select I2C4 badurate" @@ -104,7 +104,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI bool "Enable SPI" select RT_USING_SPI - default y + default n if BSP_USING_SPI config BSP_USING_SPI3 @@ -113,19 +113,19 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI8 bool "Enable Flexcomm8 as High Speed SPI" - default y + default n endif menuconfig BSP_USING_ADC config BSP_USING_ADC bool "Enable ADC Channel" select RT_USING_ADC - default y + default n if BSP_USING_ADC config BSP_USING_ADC0_CH0 bool "Enable ADC0 Channel0" - default y + default n config BSP_USING_ADC0_CH1 bool "Enable ADC0 Channel1" @@ -137,12 +137,12 @@ menu "On-chip Peripheral Drivers" select RT_USING_SDIO select RT_USING_DFS select RT_USING_DFS_ELMFAT - default y + default n config BSP_USING_RTC bool "Enable RTC" select RT_USING_RTC - default y + default n config BSP_USING_WDT bool "Enable WatchDog" @@ -153,12 +153,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_HWTIMER bool "Enable Timer" select RT_USING_HWTIMER - default y + default n if BSP_USING_HWTIMER config BSP_USING_CTIMER0 bool "Enable CIMER0" - default y + default n config BSP_USING_CTIMER1 bool "Enable CIMER1" @@ -177,12 +177,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_PWM bool "Enable PWM" select RT_USING_PWM - default y + default n if BSP_USING_PWM config BSP_USING_CTIMER2_MAT0 bool "Enable CIMER2 Match0 as PWM output" - default y + default n config BSP_USING_CTIMER2_MAT1 bool "Enable CIMER2 Match1 as PWM output" @@ -195,20 +195,10 @@ menu "On-chip Peripheral Drivers" endmenu menu "Onboard Peripheral Drivers" - config BSP_USING_LED - bool "Enable RGB LED" - select RT_USING_LED - default y - - config BSP_USING_KEY - bool "Enable Button " - select RT_USING_KEY - default y - config BSP_USING_MMA8562 bool "Enable MMA8562" select BSP_USING_I2C4 - default y + default n if BSP_USING_MMA8562 config BSP_USING_MMA8562I2C string "the device name for 3-Axis Sensor" diff --git a/bsp/lpc55sxx/lpc55s36_nxp_evk/board/Kconfig b/bsp/lpc55sxx/lpc55s36_nxp_evk/board/Kconfig index fdfb10c6ef..0215acf530 100644 --- a/bsp/lpc55sxx/lpc55s36_nxp_evk/board/Kconfig +++ b/bsp/lpc55sxx/lpc55s36_nxp_evk/board/Kconfig @@ -64,12 +64,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C bool "Enable I2C" select RT_USING_I2C - default y + default n if BSP_USING_I2C config BSP_USING_I2C1 bool "Enable Flexcomm1 I2C" - default y + default n if BSP_USING_I2C1 choice prompt "Select I2C1 badurate" @@ -85,7 +85,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C4 bool "Enable Flexcomm4 I2C" - default y + default n if BSP_USING_I2C4 choice prompt "Select I2C4 badurate" @@ -104,7 +104,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI bool "Enable SPI" select RT_USING_SPI - default y + default n if BSP_USING_SPI config BSP_USING_SPI3 @@ -113,19 +113,19 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI8 bool "Enable Flexcomm8 as High Speed SPI" - default y + default n endif menuconfig BSP_USING_ADC config BSP_USING_ADC bool "Enable ADC Channel" select RT_USING_ADC - default y + default n if BSP_USING_ADC config BSP_USING_ADC0_CH0 bool "Enable ADC0 Channel0" - default y + default n config BSP_USING_ADC0_CH1 bool "Enable ADC0 Channel1" @@ -137,12 +137,12 @@ menu "On-chip Peripheral Drivers" select RT_USING_SDIO select RT_USING_DFS select RT_USING_DFS_ELMFAT - default y + default n config BSP_USING_RTC bool "Enable RTC" select RT_USING_RTC - default y + default n config BSP_USING_WDT bool "Enable WatchDog" @@ -153,12 +153,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_HWTIMER bool "Enable Timer" select RT_USING_HWTIMER - default y + default n if BSP_USING_HWTIMER config BSP_USING_CTIMER0 bool "Enable CIMER0" - default y + default n config BSP_USING_CTIMER1 bool "Enable CIMER1" @@ -177,12 +177,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_PWM bool "Enable PWM" select RT_USING_PWM - default y + default n if BSP_USING_PWM config BSP_USING_CTIMER2_MAT0 bool "Enable CIMER2 Match0 as PWM output" - default y + default n config BSP_USING_CTIMER2_MAT1 bool "Enable CIMER2 Match1 as PWM output" @@ -195,20 +195,10 @@ menu "On-chip Peripheral Drivers" endmenu menu "Onboard Peripheral Drivers" - config BSP_USING_LED - bool "Enable RGB LED" - select RT_USING_LED - default y - - config BSP_USING_KEY - bool "Enable Button " - select RT_USING_KEY - default y - config BSP_USING_MMA8562 bool "Enable MMA8562" select BSP_USING_I2C4 - default y + default n if BSP_USING_MMA8562 config BSP_USING_MMA8562I2C string "the device name for 3-Axis Sensor" diff --git a/bsp/lpc55sxx/lpc55s69_nxp_evk/board/Kconfig b/bsp/lpc55sxx/lpc55s69_nxp_evk/board/Kconfig index dec1849da1..f45ef8479c 100644 --- a/bsp/lpc55sxx/lpc55s69_nxp_evk/board/Kconfig +++ b/bsp/lpc55sxx/lpc55s69_nxp_evk/board/Kconfig @@ -80,7 +80,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_I2C bool "Enable I2C" select RT_USING_I2C - default y + default n if BSP_USING_I2C config BSP_USING_I2C1 @@ -138,7 +138,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_SPI bool "Enable SPI" select RT_USING_SPI - default y + default n if BSP_USING_SPI config BSP_USING_SPI3 @@ -170,12 +170,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_ADC bool "Enable ADC Channel" select RT_USING_ADC - default y + default n if BSP_USING_ADC config BSP_USING_ADC0_CH0 bool "Enable ADC0 Channel0" - default y + default n config BSP_USING_ADC0_CH1 bool "Enable ADC0 Channel1" @@ -202,12 +202,12 @@ menu "On-chip Peripheral Drivers" select RT_USING_SDIO select RT_USING_DFS select RT_USING_DFS_ELMFAT - default y + default n config BSP_USING_RTC bool "Enable RTC" select RT_USING_RTC - default y + default n config BSP_USING_WDT bool "Enable WatchDog" @@ -218,12 +218,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_HWTIMER bool "Enable Timer" select RT_USING_HWTIMER - default y + default n if BSP_USING_HWTIMER config BSP_USING_CTIMER0 bool "Enable CIMER0" - default y + default n config BSP_USING_CTIMER3 bool "Enable CIMER3" @@ -238,12 +238,12 @@ menu "On-chip Peripheral Drivers" config BSP_USING_PWM bool "Enable PWM" select RT_USING_PWM - default y + default n if BSP_USING_PWM config BSP_USING_CTIMER1_MAT0 bool "Enable CIMER1 Match0 as PWM output" - default y + default n config BSP_USING_CTIMER2_MAT0 bool "Enable CIMER2 Match0 as PWM output" @@ -264,20 +264,10 @@ menu "On-chip Peripheral Drivers" endmenu menu "Onboard Peripheral Drivers" - config BSP_USING_LED - bool "Enable RGB LED" - select RT_USING_LED - default y - - config BSP_USING_KEY - bool "Enable Button " - select RT_USING_KEY - default y - config BSP_USING_MMA8562 bool "Enable MMA8562" select BSP_USING_I2C4 - default y + default n if BSP_USING_MMA8562 config BSP_USING_MMA8562I2C string "the device name for 3-Axis Sensor"