Driver#

Includes

Modules#

Driver

Device Init

Functions#

int16_t
rsi_frame_write(rsi_frame_desc_t *uFrameDscFrame, uint8_t *payloadparam, uint16_t size_param)

This API writes the frame to the host interface.

int16_t
rsi_frame_read(uint8_t *pkt_buffer)

This API reads the frame from the host interface.

int16_t
rsi_mem_wr(uint32_t addr, uint16_t len, uint8_t *dBuf)

This API writes contents of dBuf buffer to the device memory address addr for the length len.

int16_t
rsi_mem_rd(uint32_t addr, uint16_t len, uint8_t *dBuf)

This API reads the device memory contents present at the address addr into the dBuf buffer for the length len.

int16_t
rsi_device_interrupt_status(uint8_t *int_status)

This API reads the status register of the host interface layer to validate the interrupt received.

Function Documentation#

rsi_frame_write#

int16_t rsi_frame_write (rsi_frame_desc_t * uFrameDscFrame, uint8_t * payloadparam, uint16_t size_param)

This API writes the frame to the host interface.

Parameters
TypeDirectionArgument NameDescription
rsi_frame_desc_t *[in]uFrameDscFrame

- Frame descriptor

uint8_t *[in]payloadparam

- Pointer to the command payload parameter structure

uint16_t[in]size_param

- Size of the payload for the command

Common function for all the commands.

Returns

  • 0 - Success

  • Negative value - Failure

Returns

  • Negative Value = Failure 0 = SUCCESS

description#

This is a common function used to process a command to the Wi-Fi module.

This API writes the frame to the host interface.

Returns

  • 0 - Success

  • Non-Zero value - Failure

Note

  • Enable DEBUG_PACKET_EXCHANGE macro for SPI level packet exchange debug prints and MAX_PRINT_PAYLOAD_LEN for configuring number of bytes of payload to print, by default it will print 8 bytes of payload.

This API writes the frame to the host interface.

Returns

  • 0 - SUCCESS
    < 0 - FAILURE


rsi_frame_read#

int16_t rsi_frame_read (uint8_t * pkt_buffer)

This API reads the frame from the host interface.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]pkt_buffer

- pointer to buffer to which packet has to read

Returns

  • 0 - Success

  • Non-Zero value - Failure
    This API reads the frame from the host interface.

Returns

  • 0 - Success

  • Non-Zero Failure - Failure

Note

  • Enable DEBUG_PACKET_EXCHANGE macro for SPI level packet exchange debug prints and MAX_PRINT_PAYLOAD_LEN for configuring number of bytes of payload to print, by default it will print 8 bytes of payload.

This API reads the frame from the host interface.

Returns

  • 0 - Success


rsi_mem_wr#

int16_t rsi_mem_wr (uint32_t addr, uint16_t len, uint8_t * dBuf)

This API writes contents of dBuf buffer to the device memory address addr for the length len.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]addr

- Address to write to

uint16_t[in]len

- Number of bytes to write

uint8_t *[in]dBuf

- Pointer to the buffer of data to write

Returns

  • 0 - Success

  • Non-Zero value - Failure
    This API writes contents of dBuf buffer to the device memory address addr for the length len.

Returns

  • 0 - Success

  • Non-Zero value - Failure


rsi_mem_rd#

int16_t rsi_mem_rd (uint32_t addr, uint16_t len, uint8_t * dBuf)

This API reads the device memory contents present at the address addr into the dBuf buffer for the length len.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]addr

- Address to read from

uint16_t[in]len

- Number of bytes to read

uint8_t *[in]dBuf

- Pointer to the buffer to receive the data into

Returns

  • 0 - Success

  • Non-Zero value - Failure
    This API reads the device memory contents present at the address addr into the dBuf buffer for the length len.

Returns

  • 0 - Success

  • Non-Zero value - Failure


rsi_device_interrupt_status#

int16_t rsi_device_interrupt_status (uint8_t * int_status)

This API reads the status register of the host interface layer to validate the interrupt received.

Parameters
TypeDirectionArgument NameDescription
uint8_t *[in]int_status

- Pointer to the buffer of data to be read, assumed to be at least a byte

Read the USB device status.

Returns

  • 0 - Success

  • Non-zero value - Failure (Possible Error Codes - 0xffffffd0, )

Returns

  • 0 - Success

  • Non-Zero value - Failure
    This API reads the status register of the host interface layer to validate the interrupt received.

Returns

  • 0 - Success

  • Non-Zero value - Failure


References rsi_mem_rd , and RSI_SUCCESS