Skip to content

Commit

Permalink
fix(wifi_remote): Remove all other transports besides UART
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Apr 19, 2024
1 parent ec32275 commit e6ab631
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 31 deletions.
38 changes: 11 additions & 27 deletions components/esp_wifi_remote/Kconfig.rpc.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,20 @@ choice ESP_WIFI_REMOTE_LIBRARY
endchoice

if ESP_WIFI_REMOTE_LIBRARY_EPPP
menu "WiFi remote by EPPP"

choice ESP_WIFI_REMOTE_EPPP_TRANSPORT
prompt "Choose EPPP transport"
default ESP_WIFI_REMOTE_EPPP_TRANSPORT_UART
config ESP_WIFI_REMOTE_EPPP_UART_TX_PIN
int "TXD Pin Number"
default 10
range 0 31
help
Select type of EPPP transport
Pin number of UART TX.

config ESP_WIFI_REMOTE_EPPP_TRANSPORT_UART
bool "UART"
config ESP_WIFI_REMOTE_EPPP_TRANSPORT_SPI
bool "SPI"
endchoice

if ESP_WIFI_REMOTE_EPPP_TRANSPORT_UART
config ESP_WIFI_REMOTE_EPPP_UART_TX_PIN
int "TXD Pin Number"
default 10
range 0 31
help
Pin number of UART TX.

config ESP_WIFI_REMOTE_EPPP_UART_RX_PIN
int "RXD Pin Number"
default 11
range 0 31
help
Pin number of UART RX.
endif
config ESP_WIFI_REMOTE_EPPP_UART_RX_PIN
int "RXD Pin Number"
default 11
range 0 31
help
Pin number of UART RX.

config ESP_WIFI_REMOTE_EPPP_SERVER_CA
string "Servers CA certificate"
Expand All @@ -68,6 +53,5 @@ endchoice
config ESP_WIFI_REMOTE_EPPP_SERVER_KEY
string "Server key"
default "--- Please copy content of the Client key ---"
endmenu

endif
5 changes: 1 addition & 4 deletions components/esp_wifi_remote/eppp/eppp_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ __attribute__((weak)) esp_netif_t *wifi_remote_eppp_init(eppp_type_t role)
uint32_t our_ip = role == EPPP_SERVER ? EPPP_DEFAULT_SERVER_IP() : EPPP_DEFAULT_CLIENT_IP();
uint32_t their_ip = role == EPPP_SERVER ? EPPP_DEFAULT_CLIENT_IP() : EPPP_DEFAULT_SERVER_IP();
eppp_config_t config = EPPP_DEFAULT_CONFIG(our_ip, their_ip);
#if CONFIG_ESP_WIFI_REMOTE_EPPP_TRANSPORT_UART
// We currently support only UART transport
config.transport = EPPP_TRANSPORT_UART;
config.uart.tx_io = CONFIG_ESP_WIFI_REMOTE_EPPP_UART_TX_PIN;
config.uart.rx_io = CONFIG_ESP_WIFI_REMOTE_EPPP_UART_RX_PIN;
#else
#error ESP_WIFI_REMOTE supports only UART transport
#endif
return eppp_open(role, &config, portMAX_DELAY);
}

0 comments on commit e6ab631

Please sign in to comment.