Driver#

Variables#

rsi_m4ta_desc_t

Functions#

int8_t
rsi_common_cb_init(rsi_common_cb_t *common_cb)

Initialize common control block structure.

int8_t
rsi_crypto_cb_init(rsi_crypto_cb_t *crypto_cb)

Initialize crypto control block structure.

int32_t
rsi_driver_common_send_cmd(rsi_common_cmd_request_t cmd, rsi_pkt_t *pkt)

Fill commands and packets into WLAN TX queue.

int32_t

Process commands received to common block.

void
rsi_handle_slp_wkp(uint8_t frame_type)

Handle sleep and wakeup frames.

int16_t

Set wakeup GPIO high.

int16_t

Waits for wakeup confirmation pin to be set.

void

Set wakeup GPIO low.

void

Initialize GPIOs used in power save .

void

Handle packet transfer completion which has an asyncronous response.

int32_t
rsi_sleep_mode_decision(rsi_common_cb_t *rsi_common_cb)

Decides the power mode to program.

int32_t
rsi_send_ps_mode_to_module(uint8_t selected_ps_mode, uint8_t selected_ps_type)

Send the power save mode and type to module

rsi_error_t
rsi_wait_on_common_semaphore(rsi_semaphore_handle_t *semaphore, uint32_t timeout_ms)

Wait for common semaphore.

int32_t
rsi_check_and_update_cmd_state(uint8_t cmd_type, uint8_t cmd_state)

Check and update the command state.

void

Release all the common semaphores which are on semaphore wait.

void

Release all the BT, BLE protocol semaphores.

int32_t

Releases all common ,WLAN and network semaphores which are semaphore wait.

void

Check the packet in queue and dequeue the packet.

void
rsi_free_queue_pkt(uint8_t pkt_dequeued, rsi_pkt_t *pkt)

Free the queued packet.

void
rsi_error_timeout_and_clear_events(int32_t error, uint32_t cmd_type)

Clears the event and gives timeout error.

int32_t
rsi_check_waiting_cmds(rsi_rsp_waiting_cmds_t *response)

Check the commands which are waiting for the response.

int16_t
rsi_secure_ping_pong_wr(uint32_t ping_pong, uint8_t *src_addr, uint16_t size_param)

Write the given data in the ping or pong buffer to the specified register address in the module.

int32_t

Set fast firmware upgrade.

int16_t
rsi_bootloader_instructions(uint8_t type, uint16_t *data)

Send boot instructions to the module.

void

Handle the interrupt coming from the module.

void

Mask the TA interrupt.

void

Unmask the TA interrupt.

void

Read and process the RX packet from the module.

void
rsi_set_event(uint32_t event_num)

Set an event.

void
rsi_clear_event(uint32_t event_num)

Clear an event.

void
rsi_mask_event(uint32_t event_num)

Mask the specified event.

uint32_t
rsi_find_event(uint32_t event_map)

Find the event which is set.

uint16_t
rsi_register_event(uint32_t event_id, void(*event_handler_ptr)(void))

Register the given event.

void
rsi_set_event_from_isr(uint32_t event_num)

Set the event from isr context.

void

Initialize the events.

void
ROM_WL_rsi_set_event(global_cb_t *global_cb_p, uint32_t event_num)

Set an event.

void
ROM_WL_rsi_clear_event(global_cb_t *global_cb_p, uint32_t event_num)

Clear an event.

void
ROM_WL_rsi_mask_event(global_cb_t *global_cb_p, uint32_t event_num)

Mask an event.

void
ROM_WL_rsi_unmask_event(global_cb_t *global_cb_p, uint32_t event_num)

Unmask an event.

uint32_t
ROM_WL_rsi_find_event(global_cb_t *global_cb_p, uint32_t event_map)

Find the event which is set.

uint16_t
ROM_WL_rsi_register_event(global_cb_t *global_cb_p, uint32_t event_id, void(*event_handler_ptr)(void))

Register the event.

void
ROM_WL_rsi_set_event_from_isr(global_cb_t *global_cb_p, uint32_t event_num)

Set an event from ISR.

void
ROM_WL_rsi_unmask_event_from_isr(global_cb_t *global_cb_p, uint32_t event_num)

Unmask an event from ISR.

int32_t
rsi_pkt_pool_init(rsi_pkt_pool_t *pool_cb, uint8_t *buffer, uint32_t total_size, uint32_t pkt_size)

Initialize/create packet pool from the provided buffer.

rsi_pkt_alloc(rsi_pkt_pool_t *pool_cb)

Allocate packet from a given packet pool.

int32_t
rsi_pkt_free(rsi_pkt_pool_t *pool_cb, rsi_pkt_t *pkt)

Free the packet.

uint32_t
rsi_is_pkt_available(rsi_pkt_pool_t *pool_cb)

Number of available packets in pool.

int32_t
ROM_WL_rsi_pkt_pool_init(global_cb_t *global_cb_p, rsi_pkt_pool_t *pool_cb, uint8_t *buffer, uint32_t total_size, uint32_t pkt_size)

Initialize/create packet pool from the provided buffer.

ROM_WL_rsi_pkt_alloc_non_blocking(global_cb_t *global_cb_p, rsi_pkt_pool_t *pool_cb)

Allocate packet from a given packet pool.

int32_t
ROM_WL_rsi_pkt_free_non_blocking(global_cb_t *global_cb_p, rsi_pkt_pool_t *pool_cb, rsi_pkt_t *pkt)

Free the packet.

ROM_WL_rsi_pkt_alloc(global_cb_t *global_cb_p, rsi_pkt_pool_t *pool_cb)

Allocate packet from a given packet pool.

int32_t
ROM_WL_rsi_pkt_free(global_cb_t *global_cb_p, rsi_pkt_pool_t *pool_cb, rsi_pkt_t *pkt)

Free the packet.

uint32_t
ROM_WL_rsi_is_pkt_available(global_cb_t *global_cb_p, rsi_pkt_pool_t *pool_cb)

Number of available packets in pool.

Variable Documentation#

crypto_desc#

rsi_m4ta_desc_t crypto_desc[2]

Function Documentation#

rsi_common_cb_init#

int8_t rsi_common_cb_init (rsi_common_cb_t * common_cb)

Initialize common control block structure.

Parameters
TypeDirectionArgument NameDescription
rsi_common_cb_t *[in]common_cb

- pointer to common cb structure

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_crypto_cb_init#

int8_t rsi_crypto_cb_init (rsi_crypto_cb_t * crypto_cb, pkt)

Initialize crypto control block structure.

Parameters
TypeDirectionArgument NameDescription
rsi_crypto_cb_t *[in]crypto_cb

- type of the command to send

[in]pkt

- pointer of packet to send

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_driver_common_send_cmd#

int32_t rsi_driver_common_send_cmd (rsi_common_cmd_request_t cmd, rsi_pkt_t * pkt)

Fill commands and packets into WLAN TX queue.

Parameters
TypeDirectionArgument NameDescription
rsi_common_cmd_request_t[in]cmd

- type of the command to send

rsi_pkt_t *[in]pkt

- pointer of packet to send

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_driver_process_common_recv_cmd#

int32_t rsi_driver_process_common_recv_cmd (rsi_pkt_t * pkt)

Process commands received to common block.

Parameters
TypeDirectionArgument NameDescription
rsi_pkt_t *[in]pkt

- pointer to common block packet

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_handle_slp_wkp#

void rsi_handle_slp_wkp (uint8_t frame_type)

Handle sleep and wakeup frames.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]frame_type

- Frame type

Returns

  • Void


rsi_req_wakeup#

int16_t rsi_req_wakeup (void )

Set wakeup GPIO high.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_wait4wakeup#

int16_t rsi_wait4wakeup (void )

Waits for wakeup confirmation pin to be set.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_allow_sleep#

void rsi_allow_sleep (void )

Set wakeup GPIO low.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • Void


rsi_powersave_gpio_init#

void rsi_powersave_gpio_init (void )

Initialize GPIOs used in power save .

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • Void


rsi_common_packet_transfer_done#

void rsi_common_packet_transfer_done (rsi_pkt_t * pkt)

Handle packet transfer completion which has an asyncronous response.

Parameters
TypeDirectionArgument NameDescription
rsi_pkt_t *[in]pkt

- pointer to packet

Returns

  • Void


rsi_sleep_mode_decision#

int32_t rsi_sleep_mode_decision (rsi_common_cb_t * rsi_common_cb)

Decides the power mode to program.

Parameters
TypeDirectionArgument NameDescription
rsi_common_cb_t *[in]rsi_common_cb

- pointer to the common control block

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_send_ps_mode_to_module#

int32_t rsi_send_ps_mode_to_module (uint8_t selected_ps_mode, uint8_t selected_ps_type)

Send the power save mode and type to module

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]selected_ps_mode

- Select power save mode

uint8_t[in]selected_ps_type

- Select power save type

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_wait_on_common_semaphore#

rsi_error_t rsi_wait_on_common_semaphore (rsi_semaphore_handle_t * semaphore, uint32_t timeout_ms)

Wait for common semaphore.

Parameters
TypeDirectionArgument NameDescription
rsi_semaphore_handle_t *[in]semaphore

- Semaphore handle pointer

uint32_t[in]timeout_ms

- Maximum time to wait to acquire semaphore. If timeout_ms is 0 then wait till acquire semaphore.

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_check_and_update_cmd_state#

int32_t rsi_check_and_update_cmd_state (uint8_t cmd_type, uint8_t cmd_state)

Check and update the command state.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]cmd_type

- Command type
1 - COMMON_CMD
2 - WLAN_CMD
3 - NWK_CMD

uint8_t[in]cmd_state

- command state
1 - IN_USE
2 - ALLOW

Returns

  • 0 - Success

  • Non-Zero Value - Failure


Referenced by rsi_wireless_init , rsi_cmd_uart_flow_ctrl , rsi_cmd_to_wr_comm_flash , rsi_cmd_m4_ta_secure_handshake , rsi_wireless_deinit , rsi_wireless_antenna , rsi_send_feature_frame_dyn , rsi_send_feature_frame , rsi_get_fw_version , rsi_get_module_type , rsi_common_debug_log , rsi_switch_proto , rsi_set_rtc_timer , rsi_get_ram_log , rsi_get_rtc_timer , rsi_set_config , rsi_ecdsa_256_verify_hash , rsi_assert , rsi_gpio_pininit , rsi_gpio_writepin , rsi_gpio_readpin , rsi_sha_pen , rsi_hmac_sha_pen , rsi_aes_pen , rsi_exponentiation , rsi_ecdh_point_multiplication , rsi_ecdh_point_addition , rsi_ecdh_point_subtraction , rsi_ecdh_point_double , rsi_ecdh_point_affine , rsi_ccm_pen , trng_init , trng_entropy , trng_program_key , trng_get_random_num , sl_attestation_get_token , rsi_sha3_shake_pen , rsi_chachapoly_pen , rsi_gcm , rsi_dhcp_user_class , rsi_dns_req , rsi_dns_update , rsi_emb_mqtt_client_init , rsi_emb_mqtt_connect , rsi_emb_mqtt_publish , rsi_emb_mqtt_subscribe , rsi_emb_mqtt_unsubscribe , rsi_emb_mqtt_disconnect , rsi_emb_mqtt_destroy , rsi_ftp_connect , rsi_ftp_disconnect , rsi_ftp_file_write , rsi_ftp_file_write_content , rsi_ftp_file_read_aysnc , rsi_ftp_file_delete , rsi_ftp_file_rename , rsi_ftp_directory_create , rsi_ftp_directory_delete , rsi_ftp_directory_set , rsi_ftp_directory_list_async , rsi_ftp_mode_set , rsi_ftp_file_size_set , rsi_http_client_async , rsi_http_client_abort , rsi_http_client_put_create , rsi_http_client_put_delete , rsi_http_client_put_start , rsi_http_client_put_pkt , rsi_http_client_post_data , rsi_http_otaf_async , rsi_webpage_load , rsi_json_object_create , rsi_webpage_erase , rsi_json_object_delete , rsi_webpage_send , rsi_http_credentials , rsi_mdnsd_init , rsi_mdnsd_register_service , rsi_mdnsd_deinit , rsi_ota_firmware_upgradation , rsi_send_raw_data , rsi_sntp_client_create_async , rsi_sntp_client_gettime , rsi_sntp_client_gettime_date , rsi_sntp_client_server_info , rsi_sntp_client_delete_async , rsi_set_sni_emb_socket , rsi_network_app_protocol_config , rsi_wlan_radio_init , rsi_wlan_filter_broadcast , rsi_config_timeout , rsi_wlan_scan_with_bitmap_options , rsi_wlan_scan_async_with_bitmap_options , rsi_wlan_scan , rsi_wlan_scan_async , rsi_wlan_connect , rsi_wlan_set_non_pref_chan , rsi_wlan_connect_async , rsi_wlan_bgscan_profile , rsi_wlan_execute_post_connect_cmds , rsi_wlan_wps_push_button_event , rsi_send_freq_offset , rsi_calib_write , rsi_calib_read , rsi_calibrate_dpd , rsi_wlan_wps_generate_pin , rsi_wlan_wps_enter_pin , rsi_wlan_beacon_stop , rsi_get_random_bytes , rsi_wlan_ap_stop , rsi_wlan_disconnect , rsi_wlan_disconnect_stations , rsi_config_ipaddress , rsi_wlan_set_certificate_index , rsi_wlan_get , rsi_wlan_set , rsi_wlan_buffer_config , rsi_wlan_ap_start , rsi_transmit_test_start , rsi_transmit_test_stop , rsi_wlan_receive_stats_start , rsi_wlan_receive_stats_stop , rsi_wlan_send_data , rsi_wlan_twt_auto_selection , rsi_wlan_twt_config , rsi_wlan_ping_async , rsi_wlan_add_profile , rsi_wlan_get_profile , rsi_wlan_delete_profile , rsi_wlan_enable_auto_config , rsi_wlan_pmk_generate , rsi_wlan_set_sleep_timer , rsi_socket_config , rsi_wlan_update_gain_table , rsi_wlan_csi_config_async , rsi_send_evm_offset , and rsi_evm_write

rsi_post_waiting_common_semaphore#

void rsi_post_waiting_common_semaphore (void )

Release all the common semaphores which are on semaphore wait.

Parameters
TypeDirectionArgument NameDescription
void[in]


Returns

  • Void


rsi_post_waiting_bt_semaphore#

void rsi_post_waiting_bt_semaphore (void )

Release all the BT, BLE protocol semaphores.

Parameters
TypeDirectionArgument NameDescription
void[in]


Returns

  • Void


rsi_release_waiting_semaphore#

int32_t rsi_release_waiting_semaphore (void )

Releases all common ,WLAN and network semaphores which are semaphore wait.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_check_pkt_queue_and_dequeue#

void rsi_check_pkt_queue_and_dequeue (void )

Check the packet in queue and dequeue the packet.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • Void


rsi_free_queue_pkt#

void rsi_free_queue_pkt (uint8_t pkt_dequeued, rsi_pkt_t * pkt)

Free the queued packet.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]pkt_dequeued

- pkt to be free

rsi_pkt_t *[in]pkt

- pointer of the packet to be free

Returns

  • Void


rsi_error_timeout_and_clear_events#

void rsi_error_timeout_and_clear_events (int32_t error, uint32_t cmd_type)

Clears the event and gives timeout error.

Parameters
TypeDirectionArgument NameDescription
int32_t[in]error

- Error

uint32_t[in]cmd_type

- command type

Returns

  • Void


rsi_check_waiting_cmds#

void rsi_check_waiting_cmds (rsi_rsp_waiting_cmds_t * reponse)

Check the commands which are waiting for the response.

Parameters
TypeDirectionArgument NameDescription
rsi_rsp_waiting_cmds_t *[in]reponse

- pointer to the command waiting for response

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_secure_ping_pong_wr#

int16_t rsi_secure_ping_pong_wr (uint32_t ping_pong, uint8_t * src_addr, uint16_t size_param)

Write the given data in the ping or pong buffer to the specified register address in the module.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]ping_pong

- ping or pong buffer write

uint8_t *[in]src_addr

- Number of bytes to read. (def: 2 since we have 16 bit regs)

uint16_t[in]size_param

- pointer contain the buffer of content to be written

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_set_fast_fw_up#

int32_t rsi_set_fast_fw_up (void )

Set fast firmware upgrade.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_bootloader_instructions#

int16_t rsi_bootloader_instructions (uint8_t type, uint16_t * data)

Send boot instructions to the module.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]type

- type of the insruction to perform
0xD1 - RSI_REG_READ
0xD2 - RSI_REG_WRITE
0xD5 - RSI_PING_WRITE
0xD4 - RSI_PONG_WRITE
0x42 - BURN_NWP_FW
0x31 - LOAD_NWP_FW
0x71 - LOAD_DEFAULT_NWP_FW_ACTIVE_LOW

uint16_t *[in]data

- pointer to data which is to be read/write

Returns

  • 0 - Success

  • Non-Zero Value - Failure (Possible Error Codes - 0xffffffff, 0xfffffffe, 0xffffffe4)

Note

  • Refer to Error Codes for the description of above error codes.

  • This is a proprietry API and is not recommended to be used


rsi_interrupt_handler#

void rsi_interrupt_handler (void )

Handle the interrupt coming from the module.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • Void


rsi_mask_ta_interrupt#

void rsi_mask_ta_interrupt (void )

Mask the TA interrupt.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • Void


rsi_unmask_ta_interrupt#

void rsi_unmask_ta_interrupt (void )

Unmask the TA interrupt.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • Void


rsi_rx_event_handler#

void rsi_rx_event_handler (void )

Read and process the RX packet from the module.

Parameters
TypeDirectionArgument NameDescription
void[in]


Returns

  • Void


rsi_crypto_event_tx_handler#

void rsi_crypto_event_tx_handler (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

rsi_crypto_event_rx_handler#

void rsi_crypto_event_rx_handler (void )
Parameters
TypeDirectionArgument NameDescription
voidN/A

rsi_set_event#

void rsi_set_event (uint32_t event_num)

Set an event.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]event_num

- Event number to be set

Returns

  • void


rsi_clear_event#

void rsi_clear_event (uint32_t event_num)

Clear an event.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]event_num

- Event number to clear

Returns

  • void


rsi_mask_event#

void rsi_mask_event (uint32_t event_num)

Mask the specified event.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]event_num

- Event number to mask

Returns

  • Void


rsi_find_event#

uint32_t rsi_find_event (uint32_t event_map)

Find the event which is set.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]event_map

- Event map

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_register_event#

uint16_t rsi_register_event (uint32_t event_id, void(*)(void) event_handler_ptr)

Register the given event.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]event_id

- event number which needs to be registered

void(*)(void)[in]event_handler_ptr

- event handler which needs to be registered for a given event

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_set_event_from_isr#

void rsi_set_event_from_isr (uint32_t event_num)

Set the event from isr context.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]event_num

- Event number to mask

Returns

  • Void


rsi_events_init#

void rsi_events_init (void )

Initialize the events.

Parameters
TypeDirectionArgument NameDescription
void[in]

Returns

  • Void


ROM_WL_rsi_set_event#

void ROM_WL_rsi_set_event (global_cb_t * global_cb_p, uint32_t event_num)

Set an event.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the common buffer

uint32_t[in]event_num

- event number to be set

Returns

  • Void


ROM_WL_rsi_clear_event#

void ROM_WL_rsi_clear_event (global_cb_t * global_cb_p, uint32_t event_num)

Clear an event.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the common buffer

uint32_t[in]event_num

- event number to clear

Returns

  • Void


ROM_WL_rsi_mask_event#

void ROM_WL_rsi_mask_event (global_cb_t * global_cb_p, uint32_t event_num)

Mask an event.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the common buffer

uint32_t[in]event_num

- event number to mask

Returns

  • Void


ROM_WL_rsi_unmask_event#

void ROM_WL_rsi_unmask_event (global_cb_t * global_cb_p, uint32_t event_num)

Unmask an event.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the common buffer

uint32_t[in]event_num

- event number to unmask

Returns

  • Void


ROM_WL_rsi_find_event#

uint32_t ROM_WL_rsi_find_event (global_cb_t * global_cb_p, uint32_t event_map)

Find the event which is set.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the common buffer

uint32_t[in]event_map

- event map

Returns

  • Event number


ROM_WL_rsi_register_event#

uint16_t ROM_WL_rsi_register_event (global_cb_t * global_cb_p, uint32_t event_id, void(*)(void) event_handler_ptr)

Register the event.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the common buffer

uint32_t[in]event_id

- event number which needs to be registered

void(*)(void)[in]event_handler_ptr

- event handler which needs to be registered for a given event

Returns

  • 0 - Success

  • Non-Zero Value - Failure


ROM_WL_rsi_set_event_from_isr#

void ROM_WL_rsi_set_event_from_isr (global_cb_t * global_cb_p, uint32_t event_num)

Set an event from ISR.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the common buffer

uint32_t[in]event_num

- event number to be set

Returns

  • Void


ROM_WL_rsi_unmask_event_from_isr#

void ROM_WL_rsi_unmask_event_from_isr (global_cb_t * global_cb_p, uint32_t event_num)

Unmask an event from ISR.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the common buffer

uint32_t[in]event_num

- event number to unmask

Returns

  • Void


rsi_pkt_pool_init#

int32_t rsi_pkt_pool_init (rsi_pkt_pool_t * pool_cb, uint8_t * buffer, uint32_t total_size, uint32_t pkt_size)

Initialize/create packet pool from the provided buffer.

Parameters
TypeDirectionArgument NameDescription
rsi_pkt_pool_t *[in]pool_cb

- packet pool pointer which needs to be initialized

uint8_t *[in]buffer

- buffer pointer to create pool

uint32_t[in]total_size

- size of pool to create

uint32_t[in]pkt_size

- size of each packet in pool

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_pkt_alloc#

rsi_pkt_t * rsi_pkt_alloc (rsi_pkt_pool_t * pool_cb)

Allocate packet from a given packet pool.

Parameters
TypeDirectionArgument NameDescription
rsi_pkt_pool_t *[in]pool_cb

- packet pool pointer from which packet needs to be allocated

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_pkt_free#

int32_t rsi_pkt_free (rsi_pkt_pool_t * pool_cb, rsi_pkt_t * pkt)

Free the packet.

Parameters
TypeDirectionArgument NameDescription
rsi_pkt_pool_t *[in]pool_cb

- packet pool to which packet needs to be freed

rsi_pkt_t *[in]pkt

- packet pointer which needs to be freed

Returns

  • 0 - Success

  • Non-Zero Value - Failure


rsi_is_pkt_available#

uint32_t rsi_is_pkt_available (rsi_pkt_pool_t * pool_cb)

Number of available packets in pool.

Parameters
TypeDirectionArgument NameDescription
rsi_pkt_pool_t *[in]pool_cb

- pool pointer to check available packet count

Returns

  • Number of packets in pool (>=0)


ROM_WL_rsi_pkt_pool_init#

int32_t ROM_WL_rsi_pkt_pool_init (global_cb_t * global_cb_p, rsi_pkt_pool_t * pool_cb, uint8_t * buffer, uint32_t total_size, uint32_t pkt_size)

Initialize/create packet pool from the provided buffer.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the global control block

rsi_pkt_pool_t *[in]pool_cb

- packet pool pointer which needs to be initialized

uint8_t *[in]buffer

- buffer pointer to create pool

uint32_t[in]total_size

- size of pool to create

uint32_t[in]pkt_size

- size of each packet in pool

Returns

  • 0 - Success

  • Negative value - Failure


ROM_WL_rsi_pkt_alloc_non_blocking#

rsi_pkt_t * ROM_WL_rsi_pkt_alloc_non_blocking (global_cb_t * global_cb_p, rsi_pkt_pool_t * pool_cb)

Allocate packet from a given packet pool.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the global control block

rsi_pkt_pool_t *[in]pool_cb

- packet pool pointer from which packet needs to be allocated

Returns

  • Allocated packet pointer - Success

  • NULL - Failure


ROM_WL_rsi_pkt_free_non_blocking#

int32_t ROM_WL_rsi_pkt_free_non_blocking (global_cb_t * global_cb_p, rsi_pkt_pool_t * pool_cb, rsi_pkt_t * pkt)

Free the packet.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the global control block

rsi_pkt_pool_t *[in]pool_cb

- packet pool pointer from which packet needs to be allocated

rsi_pkt_t *[in]pkt

- packet pointer which needs to be freed

Returns

  • 0 - Success

  • Non-Zero Value - Failure


ROM_WL_rsi_pkt_alloc#

rsi_pkt_t * ROM_WL_rsi_pkt_alloc (global_cb_t * global_cb_p, rsi_pkt_pool_t * pool_cb)

Allocate packet from a given packet pool.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the global control block

rsi_pkt_pool_t *[in]pool_cb

- packet pool pointer from which packet needs to be allocated

Returns

  • Allocated packet pointer - Success

  • NULL - Failure


ROM_WL_rsi_pkt_free#

int32_t ROM_WL_rsi_pkt_free (global_cb_t * global_cb_p, rsi_pkt_pool_t * pool_cb, rsi_pkt_t * pkt)

Free the packet.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the global control block

rsi_pkt_pool_t *[in]pool_cb

- packet pool to which packet needs to be freed

rsi_pkt_t *[in]pkt

- packet pointer which needs to be freed

Returns

  • 0 - Success

  • Non-Zero Value - Failure


ROM_WL_rsi_is_pkt_available#

uint32_t ROM_WL_rsi_is_pkt_available (global_cb_t * global_cb_p, rsi_pkt_pool_t * pool_cb)

Number of available packets in pool.

Parameters
TypeDirectionArgument NameDescription
global_cb_t *[in]global_cb_p

- pointer to the global control block

rsi_pkt_pool_t *[in]pool_cb

- pool pointer to check available pakcets count

Returns

  • Number of packets in pool