menu "NodeMCU platform config"

    config NODEMCU_NODE_DEBUG
        bool "Enable NODE_DBG() output"
        default "n"
        help
            Enable debugging output via NODE_DBG(). This is VERY chatty.
            For development/debugging use only.

    config NODEMCU_NODE_ERR
        bool "Enable NODE_ERR() output"
        default "y"
        help
            Enable error reporting via NODE_ERR().

            It is recommended to leave this enabled - if it ever produces
            output, something has gone seriously wrong and you probably want
            to know about it.

    config NODEMCU_DEFAULT_SPIFFS_LABEL
        string "Partition label of SPIFFS to mount as default file system"
        default ""
        help
            If there are multiple SPIFFS partitions, this setting can
            be used to control which partition gets mounted as the
            default file system. Leaving it empty defaults to using
            the first SPIFFS partition found.

    config NODEMCU_MAX_OPEN_FILES
        int "Maximum number of open files"
        default 4
        help
            This sets the maximum number of open files at the same time.
            Technically, it's per file system, but the most common use
            case only has a single file system (internal SPIFFS) so in
            that case it is the number of concurrent files that can be
            opened. Raising this limit will incur some extra memory
            overhead.

    config NODEMCU_EMBED_LFS
        bool "Embed LFS as part of the NodeMCU firmware"
        default "n"
        help
            The LFS (Lua Flash Store) normally has its own partition entry,
            and can can be replaced at will. Optionally, the LFS can instead
            be permanently embedded into the NodeMCU firmware image itself.
            This can be useful for scenarios where over-the-air firmware
            upgrades are needed to also bundle Lua code. The major downside
            is that once embedded, the LFS can no longer be changed, as
            doing so would break the firmware checksums and signatures and
            leave the system unable to boot.

            The default option is to not embed the LFS, in which case LFS is
            looked for in a partition of type 0xC2 and subtype 0x01.

            To embed LFS data into firmware, use:
              ./tools/embed_lfs.sh /path/to/file1.lua /path/to/file2.lua ...

    config NODEMCU_EMBEDDED_LFS_SIZE
        hex "Embedded LUA Flash Store size"
        default 0x0
        depends on NODEMCU_EMBED_LFS
        help
            Embedded LUA Flash Store size. Set to zero to use an LFS partition
            instead of embedding the LFS within the NodeMCU firmware itself.

    menu "UART buffer size configuration"

        config NODEMCU_UART_AT_LEAST_2
            bool
            default y if IDF_TARGET_ESP32
            default y if IDF_TARGET_ESP32S2
            default y if IDF_TARGET_ESP32S3
            default y if IDF_TARGET_ESP32C3
            default y if IDF_TARGET_ESP32H2

        config NODEMCU_UART_AT_LEAST_3
            bool
            default y if IDF_TARGET_ESP32
            default y if IDF_TARGET_ESP32S3

        config NODEMCU_UART_DRIVER_BUF_SIZE_RX0
            int "RX buffer size for UART0"
            default 512
            help
                The rx buffer size to use for UART0.
                This is a buffer used to/from the UART ISR. For high-speed scenarios,
                it can be very helpful to increase the rx size.  The ISR trying
                to write to a full rx buffer results in lost data and an error
                event posted.

        config NODEMCU_UART_DRIVER_BUF_SIZE_TX0
            int "TX buffer size for UART0"
            default 512
            help
                The tx buffer size to use for UART0.
                This is a buffer used to/from the UART ISR. In some scenarios it
                can be helpful to increase the tx size. Writing to a full tx buffer
                blocks the calling RTOS task.

        config NODEMCU_UART_DRIVER_BUF_SIZE_RX1
            int "RX buffer size for UART1"
            depends on NODEMCU_UART_AT_LEAST_2
            default 512
            help
                The rx buffer size to use for UART1.
                This is a buffer used to/from the UART ISR. For high-speed scenarios,
                it can be very helpful to increase the rx size.  The ISR trying
                to write to a full rx buffer results in lost data and an error
                event posted.

        config NODEMCU_UART_DRIVER_BUF_SIZE_TX1
            int "TX buffer size for UART1"
            depends on NODEMCU_UART_AT_LEAST_2
            default 512
            help
                The tx buffer size to use for UART1.
                This is a buffer used to/from the UART ISR. In some scenarios it
                can be helpful to increase the tx size. Writing to a full tx buffer
                blocks the calling RTOS task.

        config NODEMCU_UART_DRIVER_BUF_SIZE_RX2
            int "RX buffer size for UART2"
            depends on NODEMCU_UART_AT_LEAST_3
            default 512
            help
                The rx buffer size to use for UART2.
                This is a buffer used to/from the UART ISR. For high-speed scenarios,
                it can be very helpful to increase the rx size.  The ISR trying
                to write to a full rx buffer results in lost data and an error
                event posted.

        config NODEMCU_UART_DRIVER_BUF_SIZE_TX2
            int "TX buffer size for UART2"
            depends on NODEMCU_UART_AT_LEAST_3
            default 512
            help
                The tx buffer size to use for UART2.
                This is a buffer used to/from the UART ISR. In some scenarios it
                can be helpful to increase the tx size. Writing to a full tx buffer
                blocks the calling RTOS task.

    endmenu

endmenu
