User Manual
AdafruitSDEP
All communication between the Arduino user code (your sketch) and the lower level WiFi stack from Broadcom
happens over SDEP commands.
This is similar to the way you would talk to an external I2C or SPI sensor via a set of pre-defined registers defined in the
sensor datasheet. You send specifically formatted data to known registers (or addresses), and sometimes you get data
back in a known format (depending on the command).
SDEP is the simple data exchange protocol that we use for the command and response messages between the user
code and the lower level Feather Lib that contains the WICED WiFi stack.
Normally you won't need to deal with SDEP commands yourself since these are hidden in the AdafruitFeather,
AdafruitHTTP, etc., helper classes, but a specialized helper classed name AdafruitSDEP is available to send SDEP
commands yourself and get the response data back if the need should ever arise to talk directly to the WICED stack
yourself.
AdafruitSDEP API
Constructor
AdafruitFeather inherits from AdafruitSDEP, meaning that you don't need to instantiate AdafruitSDEP directly yourself.
Simply call the functions described below from your AdafruitFeather class instance, which is normally available as
'Feather', so 'Feather.sdep(...)', 'Feather.sdep_n(...)', 'Feather.errno()', etc.
Functions
The following functions and parameters are present in AdafruitSDEP:
sdep
This function sends an SDEP command with up to one parameter (or no parameters if NULL is provided in the
'p_param' field or 'param_len' is set to 0).
SDEP stands for 'Simple Data Exchange Protocol', an in house protocol we use in a number of our products.
// Send a simple SDEP command (1 parameter value or less)
bool sdep (uint16_t cmd_id ,
uint16_t param_len , void const* p_param,
uint16_t* p_result_len , void* p_result);
// Send a complex SDEP command (multiple parameter values)
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);
// SDEP error handling functions
err_t errno (void);
char const* errstr (void);
char const* cmdstr (uint16_t cmd_id);
void err_actions (bool print, bool halt);
© Adafruit Industries https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi Page 150 of 202










