Core#

Functions#

sl_status_t
sl_si91x_driver_init(const sl_wifi_device_configuration_t *config, sl_wifi_event_handler_t event_handler)

Initialize the driver.

sl_status_t

De-initialize the driver.

sl_status_t
sl_si91x_driver_send_command(uint32_t command, sl_si91x_queue_type_t queue_type, const void *data, uint32_t data_length, sl_si91x_wait_period_t wait_period, void *sdk_context, sl_wifi_buffer_t **data_buffer)

Register a function and optional argument for scan results callback.

sl_status_t
sl_si91x_driver_send_asycn_command(uint32_t command, sl_si91x_queue_type_t queue_type, void *data, uint32_t data_length)

Send commands to the TA; whose response needs to be handled asynchronously.

sl_status_t
sl_si91x_driver_wait_for_response(rsi_wlan_cmd_request_t command, sl_si91x_wait_period_t wait_period)

Wait for a command response.

sl_status_t
sl_si91x_driver_send_socket_data(sl_si91x_socket_send_request_t *request, const void *data, uint32_t wait_time)

Send a socket command.

sl_status_t
sl_si91x_driver_send_bt_command(rsi_wlan_cmd_request_t command, sl_si91x_queue_type_t queue_type, sl_wifi_buffer_t *data)

Send a Bluetooth command.

sl_status_t
sl_si91x_wifi_set_certificate_index(uint8_t certificate_type, uint8_t certificate_index, const uint8_t *buffer, uint32_t certificate_length)

Load a certificate into a specified index.

sl_status_t
sl_si91x_driver_raw_send_command(uint8_t command, const void *data, uint32_t data_length, uint32_t wait_time)

Send a raw command frame.

sl_status_t
sl_si91x_register_callback(sl_net_event_t event, sl_net_event_handler_t function)

Register a callback function for a specific event.

sl_status_t
sl_si91x_default_handler(sl_net_event_t event, sl_wifi_buffer_t *buffer)

Default event handler for all events.

sl_status_t
sl_si91x_m4_ta_secure_handshake(uint8_t sub_cmd_type, uint8_t input_len, uint8_t *input_data, uint8_t output_len, uint8_t *output_data)

Secure handshake.

sl_status_t

Informs when assertion happens in the firmware.

Function Documentation#

sl_si91x_driver_init#

sl_status_t sl_si91x_driver_init (const sl_wifi_device_configuration_t * config, sl_wifi_event_handler_t event_handler)

Initialize the driver.

Parameters
[in]config

Pointer to device configuration.

[in]event_handler

Function pointer to receive asynchronous events.

Returns


Definition at line 64 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_driver_deinit#

sl_status_t sl_si91x_driver_deinit (void )

De-initialize the driver.

Parameters
N/A

Returns


Definition at line 74 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_driver_send_command#

sl_status_t sl_si91x_driver_send_command (uint32_t command, sl_si91x_queue_type_t queue_type, const void * data, uint32_t data_length, sl_si91x_wait_period_t wait_period, void * sdk_context, sl_wifi_buffer_t ** data_buffer)

Register a function and optional argument for scan results callback.

Parameters
[in]command

Command type to be sent to TA firmware.

[in]queue_type

Queue type to be used to send the command on.

[in]data

Command packet to be sent to the TA firmware.

[in]data_length

Length of command packet.

[in]wait_period

Timeout for the command response.

[in]sdk_context

Pointer to the context.

[in]data_buffer

Pointer to a data buffer pointer for the response data to be returned in.

Returns


Definition at line 98 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_driver_send_asycn_command#

sl_status_t sl_si91x_driver_send_asycn_command (uint32_t command, sl_si91x_queue_type_t queue_type, void * data, uint32_t data_length)

Send commands to the TA; whose response needs to be handled asynchronously.

Parameters
[in]command

Command type to be sent to TA firmware.

[in]queue_type

Queue type to be used to send the command on.

[in]data

Command packet to be sent to the TA firmware.

[in]data_length

Length of the command packet. sl_status_t. See https://docs.silabs.com/gecko-platform/4.1/common/api/group-status for details.

Note: This function doesn't acquire "command_in_flight" boolean


Definition at line 120 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_driver_wait_for_response#

sl_status_t sl_si91x_driver_wait_for_response (rsi_wlan_cmd_request_t command, sl_si91x_wait_period_t wait_period)

Wait for a command response.

Parameters
[in]command

Command type to wait .

[in]wait_period

Wait time in milliseconds to wait for command response.

Returns


Definition at line 136 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_driver_send_socket_data#

sl_status_t sl_si91x_driver_send_socket_data (sl_si91x_socket_send_request_t * request, const void * data, uint32_t wait_time)

Send a socket command.

Parameters
[in]request

Pointer to socket command packet.

[in]data

Pointer to socket data.

[in]wait_time

Timeout for the command response.

Returns


Definition at line 152 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_driver_send_bt_command#

sl_status_t sl_si91x_driver_send_bt_command (rsi_wlan_cmd_request_t command, sl_si91x_queue_type_t queue_type, sl_wifi_buffer_t * data)

Send a Bluetooth command.

Parameters
[in]command

Command type to be sent.

[in]queue_type

Queue type to send command on.

[in]data

Pointer to Bluetooth data.

Returns


Definition at line 170 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_wifi_set_certificate_index#

sl_status_t sl_si91x_wifi_set_certificate_index (uint8_t certificate_type, uint8_t certificate_index, const uint8_t * buffer, uint32_t certificate_length)

Load a certificate into a specified index.

Parameters
[in]certificate_type

Type of certificate being loaded

[in]certificate_index

Index where the certificate is to be loaded.

[in]buffer

Pointer to the buffer containing the certificate to be loaded.

[in]certificate_length

Length of the certificate buffer.

Returns


Definition at line 190 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_driver_raw_send_command#

sl_status_t sl_si91x_driver_raw_send_command (uint8_t command, const void * data, uint32_t data_length, uint32_t wait_time)

Send a raw command frame.

Parameters
[in]command

Command type to be sent.

[in]data

Pointer to the command data to be sent.

[in]data_length

Length of the data length

[in]wait_time

Wait time for the command response.

Returns


Definition at line 211 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_register_callback#

sl_status_t sl_si91x_register_callback (sl_net_event_t event, sl_net_event_handler_t function)

Register a callback function for a specific event.

Parameters
[in]event

Event to register a callback for.

[in]function

Function pointer to callback.

Returns


Definition at line 228 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_default_handler#

sl_status_t sl_si91x_default_handler (sl_net_event_t event, sl_wifi_buffer_t * buffer)

Default event handler for all events.

Parameters
[in]event

Asynchronous event received.

[in]buffer

Buffer containing data related to asynchronous event.

Returns


Definition at line 242 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_m4_ta_secure_handshake#

sl_status_t sl_si91x_m4_ta_secure_handshake (uint8_t sub_cmd_type, uint8_t input_len, uint8_t * input_data, uint8_t output_len, uint8_t * output_data)

Secure handshake.

Parameters
[in]sub_cmd_type

- Sub command.

[in]input_len

- Input data.

[in]input_data

- Length length.

[in]output_len

- Output length.

[in]output_data

- Output data.

This is a blocking API. Returns


Definition at line 416 of file components/si91x/inc/sl_si91x_driver.h

sl_si91x_assert#

sl_status_t sl_si91x_assert (void )

Informs when assertion happens in the firmware.

Parameters
N/A

Returns


Definition at line 426 of file components/si91x/inc/sl_si91x_driver.h