实现连接确定wifi通讯还是蓝牙通讯
This commit is contained in:
@@ -33,6 +33,13 @@ enum DATA_PORT_TYPE
|
||||
DATA_PORT_TYPE_BLE_CMD,
|
||||
DATA_PORT_TYPE_BLE_VAL
|
||||
};
|
||||
enum CONNECT_TYPE
|
||||
{
|
||||
DISCONNECT = 0,
|
||||
CONNECT_UART,
|
||||
CONNECT_BLE,
|
||||
CONNECT_WIFI
|
||||
};
|
||||
typedef struct
|
||||
{
|
||||
sb_data_port_t* uart_port;
|
||||
@@ -41,6 +48,8 @@ typedef struct
|
||||
sb_data_port_t* ble_spp_client_cmd;
|
||||
sb_data_port_t* ble_spp_client_val;
|
||||
sb_data_port_t* wifi;
|
||||
|
||||
socket_listen_tcp_t tcp_listen;
|
||||
}init_device_t;
|
||||
|
||||
typedef struct
|
||||
@@ -51,6 +60,8 @@ typedef struct
|
||||
sb_data_port_t* pc_device;
|
||||
init_device_t init_device;
|
||||
|
||||
uint8_t connect_embedded;
|
||||
uint8_t connect_pc;
|
||||
// int (*embedded_read)(device_t *port, void *buffer, uint32_t length);
|
||||
// int (*embedded_write)(device_t *port, const void *data, uint32_t size);
|
||||
|
||||
@@ -93,6 +104,14 @@ uint8_t wifi_init(init_device_t *port);
|
||||
* @retval 0 成功
|
||||
*/
|
||||
uint8_t embedded_device_choice(device_t *port, uint8_t type);
|
||||
/**
|
||||
* @brief PC OR 手机数据内部接口
|
||||
*
|
||||
* @param port 由对应的驱动提供的绑定接口获得的句柄
|
||||
* @param type 对应的数据接口类型
|
||||
* @retval 0 成功
|
||||
*/
|
||||
static uint8_t pc_device_choice_inside(device_t *port, uint8_t type, uint8_t connect);
|
||||
/**
|
||||
* @brief PC OR 手机数据接口
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user