menu "eppp_link"

    config EPPP_LINK_USES_PPP
        bool "Use PPP network interface"
        default "n"
        select LWIP_PPP_SUPPORT
        select LWIP_PPP_SERVER_SUPPORT
        help
            Enable this option to use PPP network interface.
            This is useful when pairing with another PPP device,
            e.g. pppd service on Linux.
            By default EPPP_LINK uses plain TUN interface,
            relying on transports to split on packet boundaries.

    choice EPPP_LINK_DEVICE
        prompt "Choose PPP device"
        default EPPP_LINK_DEVICE_UART
        help
            Select which peripheral to use for PPP link

        config EPPP_LINK_DEVICE_UART
            bool "UART"
            help
                Use UART.

        config EPPP_LINK_DEVICE_SPI
            bool "SPI"
            help
                Use SPI.

        config EPPP_LINK_DEVICE_SDIO
            bool "SDIO"
            depends on SOC_SDMMC_HOST_SUPPORTED || SOC_SDIO_SLAVE_SUPPORTED
            help
                Use SDIO.

        config EPPP_LINK_DEVICE_ETH
            bool "Ethernet"
            depends on SOC_EMAC_SUPPORTED
            help
                Use Ethernet.
                This transport could employ a full fledged Ethernet connection
                between two EPPP nodes via standard Ethernet cable.
                It could be also effectively connected directly on PCB, EMAC to EMAC,
                without any Ethernet PHY chips (using eth_dummy_phy driver).

    endchoice

    config EPPP_LINK_CONN_MAX_RETRY
        int "Maximum retry"
        default 6
        help
            Set the Maximum retry to infinitely avoid reconnecting
            This is used only with the simplified API (eppp_connect()
            and eppp_listen())

    config EPPP_LINK_PACKET_QUEUE_SIZE
        int "Packet queue size"
        default 64
        depends on EPPP_LINK_DEVICE_SPI
        help
            Size of the Tx packet queue.
            You can decrease the number for slower bit rates.

    choice EPPP_LINK_SDIO_ROLE
        prompt "Choose SDIO host or slave"
        depends on EPPP_LINK_DEVICE_SDIO
        default EPPP_LINK_DEVICE_SDIO_HOST if SOC_SDMMC_HOST_SUPPORTED
        help
            Select which either SDIO host or slave

        config EPPP_LINK_DEVICE_SDIO_HOST
            bool "Host"
            depends on SOC_SDMMC_HOST_SUPPORTED
            help
                Use SDIO host.

        config EPPP_LINK_DEVICE_SDIO_SLAVE
            bool "SLAVE"
            depends on SOC_SDIO_SLAVE_SUPPORTED
            help
                Use SDIO slave.

    endchoice

    config EPPP_LINK_ETHERNET_OUR_ADDRESS
        string "MAC address our local node"
        default "06:00:00:00:00:01"
        depends on EPPP_LINK_DEVICE_ETH

    config EPPP_LINK_ETHERNET_THEIR_ADDRESS
        string "MAC address the remote node"
        default "06:00:00:00:00:02"
        depends on EPPP_LINK_DEVICE_ETH

    config EPPP_LINK_CHANNELS_SUPPORT
        bool "Enable channel support (multiple logical channels)"
        default n
        depends on !EPPP_LINK_DEVICE_ETH
        help
            Enable support for multiple logical channels in the EPPP link layer.
            When enabled, you can configure the number of channels used for communication.

    config EPPP_LINK_NR_OF_CHANNELS
        int "Number of logical channels"
        depends on EPPP_LINK_CHANNELS_SUPPORT && !EPPP_LINK_DEVICE_ETH
        range 1 8
        default 2
        help
            Set the number of logical channels for EPPP link communication.
            Each channel can be used for independent data streams.

endmenu
