User Manual
non-zero value if any data is available.
Since we know the size of the results variable, we don't need to read back the length of the response data, and we can
insert NULL for 'p_result_len':
sdep_n
This function sends an SDEP command with an array of parameter values, using a dedicated parameter array typedef
called sdep_cmd_para_t.
Function Prototype:
Parameters:
cmd_id: The 16-bit SDEP command ID
para_count: The number of parameters in para_arr
para_arr: An array of sdep_cmd_para_t values, consisting of a 16-bit length value and a pointer to the actual
parameter data
p_results_len: A pointer to the 16-bit value where the response length will be written by the SDEP command
handler
p_result: A pointer to where the response data should be written by the SDEP command handler
Each entry in para_arr has the following structure:
Return Value:
'true' if the function executed properly, otherwise 'false' if an error occured (check .errno or .errstr for details).
Examples
The example below uses the SDEP_CMD_WIFI_PROFILE_ADD command to store the connection details to non-
volatile memory.
int AdafruitTCP::available()
{
if ( _tcp_handle == 0 ) return 0;
uint32_t result = 0;
sdep(SDEP_CMD_TCP_AVAILABLE, 4, &_tcp_handle, NULL, &result);
return result;
}
bool sdep_n(uint16_t cmd_id ,
uint8_t para_count , sdep_cmd_para_t const* para_arr,
uint16_t* p_result_len , void* p_result)
typedef struct {
uint16_t len;
void const* p_value;
} sdep_cmd_para_t;
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 152 of 202










