18 #ifndef __MINILIB_BASIC_SLIP_DRIVER_H__
19 #define __MINILIB_BASIC_SLIP_DRIVER_H__
21 #include "../mn_config.hpp"
24 #ifdef CONFIG_LWIP_SLIP_SUPPORT
26 #include <esp_netif.h>
27 #include <esp_netif_net_stack.h>
31 #include "net/mn_basic_netif.hpp"
36 class basic_slip_net_if :
public basic_net_if {
38 basic_slip_net_if() : basic_net_if() { }
40 virtual bool create_default();
43 class basic_slip_driver :
public basic_slip_net_if {
45 basic_slip_driver(uint8_t uart_num = UART_NUM_2)
46 : basic_slip_driver(uart_num, 4, 36, 115200, 1024) { }
47 basic_slip_driver(uint8_t uart_num, uint8_t tx_pin, uint8_t rx_pin)
48 : basic_slip_driver(uart_num, tx_pin, rx_pin, 115200, 1024) { }
49 basic_slip_driver(uint8_t uart_num, uint8_t tx_pin, uint8_t rx_pin,
50 uint32_t baud, uint32_t buffer_len) ;
59 void set_pin(
const uint8_t& pin,
const uint8_t& rx_pin);
60 void set_serial(
const uint8_t& uart_num,
const uint32_t& baud);
61 void set_buffer(
const uint32_t& buffer_len);
64 esp_netif_slip_config_t m_slipConfig;
65 esp_netif_netstack_config_t m_slipNetStackConfig;
#define MNNET_IPV4_ADDRESS_ANY
Definition: mn_basic_ip4_address.hpp:25
basic_ip4_address ip4_address
using basic_ip4_address for ip4_address
Definition: mn_socket.hpp:33
Definition: mn_allocator_typetraits.hpp:25