Driver#
Functions#
Initialize common control block structure.
Fill commands and places into wlan TX queue.
Process commands related to common block.
Handle sleep and wakeup.
Set wakeup GPIO high and wait for wakeup confirmation pin to get set.
Set wakeup GPIO high and waits for wakeup confirmation pin to get set.
Set wakeup GPIO low .
Initialize GPIOs used in power save .
Handle packet transfer completion which has an asyncronous response.
A handler which decides the power mode to program and change.
Send the power save command to module
Wireless library to acquire or wait for common semaphore.
This API is used by wireless library to check and update the command state to progress state.
releases all the common semaphores which are on semaphore wait
Releases the all bt ,prop_protocol ,ble semaphores.
Releases all common ,wlan and nwk semaphores which are on waiting.
Check the packet queues and dequeues the packet.
Clear the event and gives timeout error.
Check the commands which are waiting for the response and sets the flag.
Write the given data to the specified register address in the Module. This API writes the given data in ping or pong buffer.
Check board ready from module.
Send firmware load request to module or update default configurations.
Fast setting of fw_up.
Send boot instructions to module.
Handle the interrupt coming from the module.
Mask the TA interrupt.
Unmask the TA interrupt.
Read the packet from module and process RX packet.
Set an event.
Clear an event.
Mask an event specified using the event number.
Find the event which is set from the event map.
Register the event handler for the given event.
Set the event from isr context.
Initialize the events.
Set an event.
Clear an event.
Mask an event.
Unmask an event.
Find the event which is set from the map.
Register the event.
Set an event from ISR.
Unmask an event from ISR.
Initialize/create packet pool from the provided buffer.
Allocate packet from a given packet pool.
Free the packet.
Return number of available packets in pool.
Initialize/create packet pool from the provided buffer.
Allocate packet from a given packet pool.
Free the packet.
Allocate packet from a given packet pool.
Free the packet.
Return number of avaiable packets in pool.
Write content to flash memory.
Function Documentation#
rsi_common_cb_init#
int8_t rsi_common_cb_init (rsi_common_cb_t * common_cb)
Initialize common control block structure.
[in] | common_cb | - pointer to common cb structure |
Returns
0 - Success Non-Zero Value - Failure
45
of file driver/rsi_common.c
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 places into wlan TX queue.
[in] | cmd | - type of the command to send |
[in] | pkt | - pointer of packet to send |
Returns
0 - Success Non-Zero Value - Failure
109
of file driver/rsi_common.c
rsi_driver_process_common_recv_cmd#
int32_t rsi_driver_process_common_recv_cmd (rsi_pkt_t * pkt)
Process commands related to common block.
[in] | pkt | - pointer to common block packet |
Returns
0 - Success Non-Zero Value - Failure
426
of file driver/rsi_common.c
rsi_handle_slp_wkp#
void rsi_handle_slp_wkp (uint8_t frame_type)
Handle sleep and wakeup.
[in] | frame_type | - Frame type |
Returns
void
880
of file driver/rsi_common.c
rsi_req_wakeup#
int8_t rsi_req_wakeup (void )
Set wakeup GPIO high and wait for wakeup confirmation pin to get set.
[in] |
Returns
0 - Success Non-Zero Value - Failure
949
of file driver/rsi_common.c
rsi_wait4wakeup#
int8_t rsi_wait4wakeup (void )
Set wakeup GPIO high and waits for wakeup confirmation pin to get set.
[in] |
Returns
0 - Success Non-Zero Value - Failure
1005
of file driver/rsi_common.c
rsi_allow_sleep#
void rsi_allow_sleep (void )
Set wakeup GPIO low .
[in] |
Returns
void
1062
of file driver/rsi_common.c
rsi_powersave_gpio_init#
void rsi_powersave_gpio_init (void )
Initialize GPIOs used in power save .
[in] |
Returns
void
1084
of file driver/rsi_common.c
rsi_common_packet_transfer_done#
void rsi_common_packet_transfer_done (rsi_pkt_t * pkt)
Handle packet transfer completion which has an asyncronous response.
[in] | pkt | - pointer to packet |
Returns
void
1106
of file driver/rsi_common.c
rsi_sleep_mode_decision#
int32_t rsi_sleep_mode_decision (rsi_common_cb_t * rsi_common_cb)
A handler which decides the power mode to program and change.
[in] | rsi_common_cb | - pointer to the common control block |
Returns
0 - Success Non-Zero Value - Failure
1124
of file driver/rsi_common.c
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 command to module
[in] | selected_ps_mode | - Select power save mode |
[in] | selected_ps_type | - Select power save type |
Returns
0 - Success Non-Zero Value - Failure
1223
of file driver/rsi_common.c
rsi_wait_on_common_semaphore#
rsi_error_t rsi_wait_on_common_semaphore (rsi_semaphore_handle_t * semaphore, uint32_t timeout_ms)
Wireless library to acquire or wait for common semaphore.
[in] | semaphore | - Semaphore handle pointer |
[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
1351
of file driver/rsi_common.c
rsi_check_and_update_cmd_state#
int32_t rsi_check_and_update_cmd_state (uint8_t cmd_type, uint8_t cmd_state)
This API is used by wireless library to check and update the command state to progress state.
[in] | cmd_type | - Command type 1 - COMMON_CMD 2 - WLAN_CMD 3 - NWK_CMD |
[in] | cmd_state | - command state 1 - IN_USE 2 - ALLOW |
Returns
0 - Success Non-Zero Value - Failure
1380
of file driver/rsi_common.c
rsi_post_waiting_common_semaphore#
void rsi_post_waiting_common_semaphore (void )
releases all the common semaphores which are on semaphore wait
[in] |
Returns
void
1464
of file driver/rsi_common.c
rsi_post_waiting_bt_semaphore#
void rsi_post_waiting_bt_semaphore (void )
Releases the all bt ,prop_protocol ,ble semaphores.
[in] |
Returns
void
1499
of file driver/rsi_common.c
rsi_release_waiting_semaphore#
int32_t rsi_release_waiting_semaphore (void )
Releases all common ,wlan and nwk semaphores which are on waiting.
[in] |
Returns
0 - Success
1558
of file driver/rsi_common.c
rsi_check_pkt_queue_and_dequeue#
void rsi_check_pkt_queue_and_dequeue (void )
Check the packet queues and dequeues the packet.
[in] |
Returns
void
1597
of file driver/rsi_common.c
rsi_error_timeout_and_clear_events#
void rsi_error_timeout_and_clear_events (int32_t error, uint32_t cmd_type)
Clear the event and gives timeout error.
[in] | error | - Error |
[in] | cmd_type | - command type |
Returns
void
1672
of file driver/rsi_common.c
rsi_check_waiting_cmds#
void rsi_check_waiting_cmds (rsi_rsp_waiting_cmds_t * reponse)
Check the commands which are waiting for the response and sets the flag.
[in] | reponse | - Buffer |
Returns
void
1708
of file driver/rsi_common.c
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 to the specified register address in the Module. This API writes the given data in ping or pong buffer.
[in] | ping_pong | - ping or pong buffer write |
[in] | src_addr | - Number of bytes to read. (def: 2 since we have 16 bit regs) |
[in] | size_param | - pointer contain the buffer of content to be written |
Returns
0 - Success Non-Zero Value - Failure
52
of file driver/rsi_device_init.c
rsi_bl_waitfor_boardready#
int16_t rsi_bl_waitfor_boardready (void )
Check board ready from module.
[in] |
Returns
0 - Success Negative Value - Failure -3 - Board ready not received -4 - Bootup options last configuration not saved -5 - Bootup options checksum failed -6 - Bootloader version mismatch
136
of file driver/rsi_device_init.c
rsi_bl_select_option#
int16_t rsi_bl_select_option (uint8_t cmd)
Send firmware load request to module or update default configurations.
[in] | cmd | - type of configuration to be saved |
Returns
0 - Success Non-Zero Value - Failure
178
of file driver/rsi_device_init.c
rsi_set_fast_fw_up#
int32_t rsi_set_fast_fw_up (void )
Fast setting of fw_up.
[in] |
Returns
0 - Success Non-Zero Value - Failure
382
of file driver/rsi_device_init.c
rsi_bootloader_instructions#
int16_t rsi_bootloader_instructions (uint8_t type, uint16_t * data)
Send boot instructions to module.
[in] | type | - type of the insruction to perform |
[in] | data | - pointer to data which is to be read/write |
Returns
0 - Success Non-Zero Value - Failure
432
of file driver/rsi_device_init.c
rsi_interrupt_handler#
void rsi_interrupt_handler (void )
Handle the interrupt coming from the module.
[in] |
Returns
void
34
of file driver/rsi_driver.c
rsi_mask_ta_interrupt#
void rsi_mask_ta_interrupt (void )
Mask the TA interrupt.
[in] |
Returns
void
57
of file driver/rsi_driver.c
rsi_unmask_ta_interrupt#
void rsi_unmask_ta_interrupt (void )
Unmask the TA interrupt.
[in] |
Returns
void
74
of file driver/rsi_driver.c
rsi_rx_event_handler#
void rsi_rx_event_handler (void )
Read the packet from module and process RX packet.
[in] |
Returns
void
576
of file driver/rsi_driver_event_handlers.c
rsi_set_event#
void rsi_set_event (uint32_t event_num)
Set an event.
[in] | event_num | - Event number to be set |
Returns
void
137
of file driver/rsi_events.c
rsi_clear_event#
void rsi_clear_event (uint32_t event_num)
Clear an event.
[in] | event_num | - Event number to clear |
Returns
void
155
of file driver/rsi_events.c
rsi_mask_event#
void rsi_mask_event (uint32_t event_num)
Mask an event specified using the event number.
[in] | event_num | - Event number to mask |
Returns
void
172
of file driver/rsi_events.c
rsi_find_event#
uint32_t rsi_find_event (uint32_t event_map)
Find the event which is set from the event map.
[in] | event_map | - Event map |
Returns
0 - Success Non-Zero Value - Failure
236
of file driver/rsi_events.c
rsi_register_event#
uint16_t rsi_register_event (uint32_t event_id, void(*)(void) event_handler_ptr)
Register the event handler for the given event.
[in] | event_id | - event number which needs to be registered |
[in] | event_handler_ptr | - event handler which needs to be registered for a given event |
Returns
0 - Success 1 - Error
256
of file driver/rsi_events.c
rsi_set_event_from_isr#
void rsi_set_event_from_isr (uint32_t event_num)
Set the event from isr context.
[in] | event_num | - Event number to mask |
Returns
void
274
of file driver/rsi_events.c
rsi_events_init#
void rsi_events_init (void )
Initialize the events.
[in] |
Returns
void
293
of file driver/rsi_events.c
ROM_WL_rsi_set_event#
void ROM_WL_rsi_set_event (global_cb_t * global_cb_p, uint32_t event_num)
Set an event.
[in] | global_cb_p | - pointer to the common buffer |
[in] | event_num | - event number to be set |
Returns
void
41
of file driver/rsi_events_rom.c
ROM_WL_rsi_clear_event#
void ROM_WL_rsi_clear_event (global_cb_t * global_cb_p, uint32_t event_num)
Clear an event.
[in] | global_cb_p | - pointer to the common buffer |
[in] | event_num | - event number to clear |
Returns
void
73
of file driver/rsi_events_rom.c
ROM_WL_rsi_mask_event#
void ROM_WL_rsi_mask_event (global_cb_t * global_cb_p, uint32_t event_num)
Mask an event.
[in] | global_cb_p | - pointer to the common buffer |
[in] | event_num | - event number to mask |
Returns
void
99
of file driver/rsi_events_rom.c
ROM_WL_rsi_unmask_event#
void ROM_WL_rsi_unmask_event (global_cb_t * global_cb_p, uint32_t event_num)
Unmask an event.
[in] | global_cb_p | - pointer to the common buffer |
[in] | event_num | - event number to unmask |
Returns
void
124
of file driver/rsi_events_rom.c
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 from the map.
[in] | global_cb_p | - pointer to the common buffer |
[in] | event_map | - event map |
Returns
Event number
154
of file driver/rsi_events_rom.c
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.
[in] | global_cb_p | - pointer to the common buffer |
[in] | event_id | - event number which needs to be registered |
[in] | event_handler_ptr | - event handler which needs to be registered for a given event |
Returns
0 - Success 1 - Error
177
of file driver/rsi_events_rom.c
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.
[in] | global_cb_p | - pointer to the common buffer |
[in] | event_num | - event number to be set |
Returns
void
204
of file driver/rsi_events_rom.c
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.
[in] | global_cb_p | - pointer to the common buffer |
[in] | event_num | - event number to unmask |
Returns
void
229
of file driver/rsi_events_rom.c
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.
[in] | pool_cb | - packet pool pointer which needs to be initialized |
[in] | buffer | - buffer pointer to create pool |
[in] | total_size | - size of pool to create |
[in] | pkt_size | - size of each packet in pool |
Returns
0 - Success Negative Value - Failure
38
of file driver/rsi_pkt_mgmt.c
rsi_pkt_alloc#
rsi_pkt_t * rsi_pkt_alloc (rsi_pkt_pool_t * pool_cb)
Allocate packet from a given packet pool.
[in] | pool_cb | - packet pool pointer from which packet needs to be allocated |
Returns
0 - Success Positive Value - Failure
57
of file driver/rsi_pkt_mgmt.c
rsi_pkt_free#
int32_t rsi_pkt_free (rsi_pkt_pool_t * pool_cb, rsi_pkt_t * pkt)
Free the packet.
[in] | pool_cb | - packet pool to which packet needs to be freed |
[in] | pkt | - packet pointer which needs to be freed |
Returns
0 - Success Non-Zero Value - Failure
77
of file driver/rsi_pkt_mgmt.c
rsi_is_pkt_available#
uint32_t rsi_is_pkt_available (rsi_pkt_pool_t * pool_cb)
Return number of available packets in pool.
[in] | pool_cb | - pool pointer to check available packet count |
Returns
>=0 - Number of packets in pool
95
of file driver/rsi_pkt_mgmt.c
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.
[in] | global_cb_p | - pointer to the global control block |
[in] | pool_cb | - packet pool pointer which needs to be initialized |
[in] | buffer | - buffer pointer to create pool |
[in] | total_size | - size of pool to create |
[in] | pkt_size | - size of each packet in pool |
Returns
0 - Success Negative value - Failure
41
of file driver/rsi_pkt_mgmt_rom.c
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.
[in] | global_cb_p | - pointer to the global control block |
[in] | pool_cb | - packet pool pointer from which packet needs to be allocated |
Returns
Allocated packet pointer if Success NULL - If allocation fails
116
of file driver/rsi_pkt_mgmt_rom.c
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.
[in] | global_cb_p | - pointer to the global control block |
[in] | pool_cb | - packet pool pointer from which packet needs to be allocated |
[in] | pkt | - packet pointer which needs to be freed |
Returns
0 - Success Negative Value - Failure
167
of file driver/rsi_pkt_mgmt_rom.c
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.
[in] | global_cb_p | - pointer to the global control block |
[in] | pool_cb | - packet pool pointer from which packet needs to be allocated |
Returns
Allocated packet pointer if Success NULL - If allocation fails
210
of file driver/rsi_pkt_mgmt_rom.c
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.
[in] | global_cb_p | - pointer to the global control block |
[in] | pool_cb | - packet pool to which packet needs to be freed |
[in] | pkt | - packet pointer which needs to be freed |
Returns
0 - Success Negative Value - Failure
260
of file driver/rsi_pkt_mgmt_rom.c
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)
Return number of avaiable packets in pool.
[in] | global_cb_p | - pointer to the global control block |
[in] | pool_cb | - pool pointer to check available pakcets count |
Returns
Number of packet in pool
301
of file driver/rsi_pkt_mgmt_rom.c
rsi_flash_mem_wr#
int32_t rsi_flash_mem_wr (rsi_flash_write_t * write_req)
Write content to flash memory.
[in] | write_req | - Content to be written to flash memory |
Returns
0 - Success Non-Zero Value - Failure
7178
of file wlan/rsi_wlan_apis.c