feat(uart): Init
This commit is contained in:
parent
687929b43d
commit
fb348f2b47
|
@ -1279,7 +1279,7 @@ esp_err_t my_uart_driver_delete(uart_port_t uart_num)
|
|||
return ESP_OK;
|
||||
}
|
||||
|
||||
void uart_set_select_notif_callback(uart_port_t uart_num, uart_select_notif_callback_t uart_select_notif_callback)
|
||||
void my_uart_set_select_notif_callback(uart_port_t uart_num, uart_select_notif_callback_t uart_select_notif_callback)
|
||||
{
|
||||
if (uart_num < UART_NUM_MAX && p_uart_obj[uart_num])
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
set(COMPONENT_ADD_INCLUDEDIRS "${PROJECT_PATH}")
|
||||
set(COMPONENT_SRCS "main.c timer.c tcp_server.c usbip_server.c DAP_handle.c kcp_server.c tcp_netconn.c")
|
||||
set(COMPONENT_SRCS "main.c timer.c tcp_server.c usbip_server.c DAP_handle.c kcp_server.c tcp_netconn.c uart_bridge.c")
|
||||
|
||||
register_component()
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "main/tcp_server.h"
|
||||
#include "main/tcp_netconn.h"
|
||||
#include "main/kcp_server.h"
|
||||
#include "main/uart_bridge.h"
|
||||
#include "main/timer.h"
|
||||
#include "main/wifi_configuration.h"
|
||||
|
||||
|
@ -185,6 +186,9 @@ void app_main()
|
|||
// DAP handle task
|
||||
xTaskCreate(DAP_Thread, "DAP_Task", 2048, NULL, 10, &kDAPTaskHandle);
|
||||
|
||||
#if (USE_UART_BRIDGE == 1)
|
||||
xTaskCreate(uart_bridge_task, "uart_server", 1024, NULL, 9, NULL);
|
||||
#endif
|
||||
// SWO Trace Task
|
||||
#if (SWO_FUNCTION_ENABLE == 1)
|
||||
xTaskCreate(SWO_Thread, "SWO_Task", 512, NULL, 10, NULL);
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
* @copyright Copyright (c) 2020
|
||||
*
|
||||
*/
|
||||
#include "tcp_server.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/param.h>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef _UART_BRIDGE_H_
|
||||
#define _UART_BRIDGE_H_
|
||||
|
||||
void uart_bridge_task();
|
||||
|
||||
#endif
|
|
@ -21,6 +21,10 @@
|
|||
#define DAP_IP_NETMASK 255, 255, 255, 0
|
||||
//
|
||||
|
||||
#define USE_UART_BRIDGE 0
|
||||
#define UART_BRIDGE_PORT 1234
|
||||
|
||||
|
||||
#define USE_TCP_NETCONN 0
|
||||
|
||||
// DO NOT CHANGE
|
||||
|
|
Loading…
Reference in New Issue