|
|
@ -93,10 +93,6 @@ typedef struct Message* Message;
|
|
|
|
|
|
|
|
|
|
|
|
Client client_new(void* buffer, size_t size);
|
|
|
|
Client client_new(void* buffer, size_t size);
|
|
|
|
|
|
|
|
|
|
|
|
static const uint8_t CONNECTION_WIFI_AP = 0;
|
|
|
|
|
|
|
|
static const uint8_t CONNECTION_WIFI_STA = 1;
|
|
|
|
|
|
|
|
static const uint8_t CONNECTION_USB_RNDIS = 2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Not sure what these are for, but they are used for the hostbyte
|
|
|
|
// Not sure what these are for, but they are used for the hostbyte
|
|
|
|
static const uint8_t DEFAULT_CLIENT_HOST = 9;
|
|
|
|
static const uint8_t DEFAULT_CLIENT_HOST = 9;
|
|
|
|
static const uint8_t DEFAULT_CLIENT_INDEX = 6;
|
|
|
|
static const uint8_t DEFAULT_CLIENT_INDEX = 6;
|
|
|
@ -115,6 +111,12 @@ static inline void byte2host(uint8_t b, uint8_t* host, uint8_t* index) {
|
|
|
|
|
|
|
|
|
|
|
|
static const uint8_t SET_SDK_CONNECTION_CMDID = 0xD4;
|
|
|
|
static const uint8_t SET_SDK_CONNECTION_CMDID = 0xD4;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum CONNECTION {
|
|
|
|
|
|
|
|
CONNECTION_WIFI_AP = 0,
|
|
|
|
|
|
|
|
CONNECTION_WIFI_STA = 1,
|
|
|
|
|
|
|
|
CONNECTION_USB_RNDIS = 2
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct PACKED SetSdkConnectionReq {
|
|
|
|
struct PACKED SetSdkConnectionReq {
|
|
|
|
uint8_t control;
|
|
|
|
uint8_t control;
|
|
|
|
uint8_t host;
|
|
|
|
uint8_t host;
|
|
|
@ -130,7 +132,11 @@ struct PACKED SetSdkConnectionResp {
|
|
|
|
uint32_t config_ip;
|
|
|
|
uint32_t config_ip;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
const Message set_sdk_connection_req_new(Client session, struct SetSdkConnectionReq* msg);
|
|
|
|
const Message set_sdk_connection_req_new(
|
|
|
|
|
|
|
|
Client session,
|
|
|
|
|
|
|
|
enum CONNECTION connection_type,
|
|
|
|
|
|
|
|
uint32_t ip_address,
|
|
|
|
|
|
|
|
uint16_t port );
|
|
|
|
|
|
|
|
|
|
|
|
static const uint8_t GET_VERSION_CMDID = 0x01;
|
|
|
|
static const uint8_t GET_VERSION_CMDID = 0x01;
|
|
|
|
|
|
|
|
|
|
|
|