menu "Hardware Drivers Config"

    menu "On-chip Peripheral Drivers"
        source "$(BSP_DIR)/../libraries/m2354/rtt_port/Kconfig"
    endmenu

    menu "On-board Peripheral Drivers"

        config BSP_USING_NULINKME
            bool "Enable UART0 for RTT Console.(uart0)"
            select BSP_USING_UART
            select BSP_USING_UART0
            default y
        config BOARD_USING_ESP8266
            bool "ESP8266 Wi-Fi module supporting(over uart4)"
            select BSP_USING_UART
            select BSP_USING_UART4
            select BSP_USING_UART4_RX_DMA
            select BSP_USING_UART4_TX_DMA
            select PKG_USING_AT_DEVICE
            select AT_DEVICE_USING_ESP8266
            select AT_DEVICE_ESP8266_INIT_ASYN
            default n

        config BOARD_USING_STORAGE_SDCARD
            bool "SDCARD supporting.(over sdh0)"
            select BSP_USING_SDH
            select BSP_USING_SDH0
            default n

        choice FS_USB_PORTS_SEL
            prompt "Select FS USB Ports"

            config BOARD_USING_USBD
                select BSP_USING_USBD
                bool "Enable USBD(over USB1.1)"
                help
                    Choose this option if you need USBD function mode.

            config BOARD_USING_USBH
                select BSP_USING_USBH
                bool "Enable USBH(over USB1.1)"
                help
                    Choose this option if you need USBH function mode.

            config BOARD_USING_OTG
                select BSP_USING_OTG
                bool "Enable OTG(over USB1.1)"
                help
                    Choose this option if you need OTG function mode.

            config BOARD_USING_USB_NONE
                select BSP_USING_USB_NONE
                bool "Disable USB1.1 port"
                help
                    Choose this option if you need not USB function.

        endchoice


    endmenu

    menu "Board extended module drivers"
        config BOARD_USING_LCD_ILI9341
            bool "LCD ILI9341 (over spi1)"
            select RT_USING_TOUCH
            select BSP_USING_SPI1
            select BSP_USING_EADC
            select BSP_USING_EADC0
            select NU_PKG_USING_ADC_TOUCH
            select NU_PKG_USING_ADC_TOUCH_SW
            select NU_PKG_USING_ILI9341
            select NU_PKG_USING_ILI9341_SPI
            select NU_PKG_ILI9341_WITH_OFFSCREEN_FRAMEBUFFER
            select NU_PKG_ILI9341_HORIZONTAL
            default n

        if BOARD_USING_LCD_ILI9341

            config BOARD_USING_ILI9341_PIN_BACKLIGHT
            int "Specify the pin index of backlight pin index"
                range 0 127
                default 43

            config BOARD_USING_ILI9341_PIN_RESET
            int "Specify the pin index of reset pin index"
                range 0 127
                default 9

            config BOARD_USING_ILI9341_PIN_DC
            int "Specify the pin index of data&command switching"
                range 0 127
                default 8

        endif

        config BOARD_USING_SEGMENT_LCD
            bool "Segment LCD supporting.(over lcd)"
            select BSP_USING_SLCD
            default n

    endmenu

    source "$(BSP_DIR)/../libraries/nu_packages/Kconfig"

endmenu
