menu "Board Support Package"

    config BSP_ERROR_CHECK
        bool "Enable error check in BSP"
        default y
        help
            Error check assert the application before returning the error code.

    menu "I2C"
        config BSP_I2C_NUM
            int "I2C peripheral index"
            default 0
            range 0 1
            help
                ESP32C5 has two I2C peripherals, pick the one you want to use.

        config BSP_I2C_FAST_MODE
            bool "Enable I2C fast mode"
            default y
            help
                I2C has two speed modes: normal (100kHz) and fast (400kHz).

        config BSP_I2C_CLK_SPEED_HZ
            int
            default 400000 if BSP_I2C_FAST_MODE
            default 100000
    endmenu

    menu "SPIFFS - Virtual File System"
        config BSP_SPIFFS_FORMAT_ON_MOUNT_FAIL
            bool "Format SPIFFS if mounting fails"
            default n
            help
                Format SPIFFS if it fails to mount the filesystem.

        config BSP_SPIFFS_MOUNT_POINT
            string "SPIFFS mount point"
            default "/spiffs"
            help
                Mount point of SPIFFS in the Virtual File System.

        config BSP_SPIFFS_PARTITION_LABEL
            string "Partition label of SPIFFS"
            default "storage"
            help
                Partition label which stores SPIFFS.

        config BSP_SPIFFS_MAX_FILES
            int "Max files supported for SPIFFS VFS"
            default 5
            help
                Supported max files for SPIFFS in the Virtual File System.
    endmenu

    menu "SD card - Virtual File System"
        config BSP_SD_FORMAT_ON_MOUNT_FAIL
            bool "Format SD card if mounting fails"
            default n
            help
                The SDMMC host will format (FAT) the SD card if it fails to mount the filesystem.

        config BSP_SD_MOUNT_POINT
            string "SD card mount point"
            default "/sdcard"
            help
                Mount point of the SD card in the Virtual File System

    endmenu

    menu "Display"
        config BSP_DISPLAY_BRIGHTNESS_LEDC_CH
        int "LEDC channel index"
        default 1
        range 0 7
        help
            LEDC channel is used to generate PWM signal that controls display brightness.
            Set LEDC index that should be used.

        config BSP_LCD_DRAW_BUF_HEIGHT
        int "LCD framebuf height"
        default 100
        range 10 240
        help
            Framebuf is used for lvgl rendering output.

        config BSP_LCD_DRAW_BUF_DOUBLE
        bool "LCD double framebuf"
        default n
        help
            Whether to enable double framebuf.
    endmenu
    
endmenu
