menu "LightBulb Driver Config"

    menu "Drivers"
        config ENABLE_PWM_DRIVER
            bool "Enable PWM interface"
            default "y"
            help
                Enable PWM output.

        config PWM_ENABLE_HW_FADE
            depends on ENABLE_PWM_DRIVER
            bool "Use hardware fade API"
            default "n"
            help
                Use the hardware fade API to implement the fade function, and the change of the duty cycle will be smoother.
                Please note: the lightbulb component still uses esp_timer to trigger the fade API, and the fade API is only used for small-scale changes.

        config ENABLE_SM2135EH_DRIVER
            bool "Enable sm2135eh interface"
            default "y"
            help
                Enable SM2135eh output.

        config ENABLE_SM2182E_DRIVER
            bool "Enable sm2182e interface"
            default "y"
            help
                Enable SN2182e output.

        config ENABLE_SM2X35EGH_DRIVER
            bool "Enable sm2x35egh(sm2235egh sm2335egh) interface"
            default "y"
            help
                Enable SM2x35egh output.

        config ENABLE_BP57X8D_DRIVER
            bool "Enable bp57x8d(bp5758d bp5768d) interface"
            default "y"
            help
                Enable BP5758d output.

        config ENABLE_BP1658CJ_DRIVER
            bool "Enable bp1658cj interface"
            default "y"
            help
                Enable BP1658cj output.

        config ENABLE_KP18058_DRIVER
            bool "Enable kp18058 interface"
            default "y"
            help
                Enable KP18058 output.

        config ENABLE_WS2812_DRIVER
            bool "Enable ws2812 interface"
            default "y"
            help
                Enable ws2812 output.

        config ENABLE_SM16825E_DRIVER
            bool "Enable sm16825e interface"
            default "y"
            help
                Enable SM16825E output.

        menu "IIC Config"
            depends on ENABLE_KP18058_DRIVER || ENABLE_BP1658CJ_DRIVER || ENABLE_BP57X8D_DRIVER || ENABLE_SM2X35EGH_DRIVER || ENABLE_SM2135EH_DRIVER || ENABLE_SM2135E_DRIVER

            config ESP_IDF_VERSION
                string
                default "${ESP_IDF_VERSION}"

            config LB_ENABLE_NEW_IIC_DRIVER
                depends on ESP_IDF_VERSION >= 5.2.6
                bool "Enable new I2C driver"
                default "y"
                help
                    Enable new I2C driver.

            config LB_IIC_TASK_STACK
                int "IIC Send Task stack"
                default 2048
                help
                    Stack size for the IIC Send Task.

            config LB_IIC_QUEUE_SIZE
                int "IIC QUEUE Size"
                default 20
                help
                    Queue size for the IIC Send queue.

            config LB_IIC_TASK_PRIORITY
                int "IIC Send Task priority"
                default 20
                help
                    Priority for the IIC Send Task. Not recommended to be changed
                    unless you really need it.
        endmenu

    endmenu

    config ENABLE_DITHERING_CHECK
            bool "Enable dithering check and try to fix"
            default "y"
            help
                Dithering check and fix.

    config USE_GPTIMER_GENERATE_TICKS
            bool "Use gptimer generate tick"
            default "y"
            help
                fade tick uses gptimer instead of esp_timer.

    menu "Gptimer Tick Notify Task Config"
            depends on USE_GPTIMER_GENERATE_TICKS

            config LB_NOTIFY_TASK_STACK
                int "gptimer tick notify task stack"
                # for xtensa, the minimum stack size is 1280
                default 1280 if IDF_TARGET_ARCH_XTENSA
                default 1024
                help
                    Stack size for the gptimer tick notify task.

            config LB_NOTIFY_TASK_PRIORITY
                int "gptimer tick notify task priority"
                default 20
                help
                    Priority for the gptimer tick notify task. Not recommended to be changed
                    unless you really need it.
    endmenu

    menu "Debug Log Config"
        config ENABLE_LIGHTBULB_DEBUG
            bool "Enable the debug feature int the lightbulb driver"
            default "n"
            help
                Enable Lightbulb debug tools.

        choice LIGHTBULB_CHECK_LOG_DEFAULT_LEVEL
            bool "Default LIGHTBULB_CHECK/DRIVER_CHECK macro print log level"
            default LIGHTBULB_CHECK_DEFAULT_LEVEL_2
            help
                The verbosity of the log output, if you need to save flash size please lower the output level.

            config LIGHTBULB_CHECK_DEFAULT_LEVEL_0
                bool "Level 0, Print very little log with ESP_LOGW"
            config LIGHTBULB_CHECK_DEFAULT_LEVEL_1
                bool "Level 1, Print very little log"
            config LIGHTBULB_CHECK_DEFAULT_LEVEL_2
                bool "Level 2, Print basic log"
            config LIGHTBULB_CHECK_DEFAULT_LEVEL_3
                bool "Level 3, Print detail log"
        endchoice
    endmenu

endmenu
