Serial Input-Output#

Introduction#

Serial Input/Output (SIO) refers to a method of data transfer where information is sent and received sequentially, one bit at a time, over a single communication channel. This communication can occur between different electronic devices, such as micro-controllers, sensors, or other components.

Key features of SIO include:

  • SIO Functionality is supported by Eight GPIO pins.

  • Detects a 32-bit pattern on the input pins.

  • SIO will transmit or receive the MSB First.

Configuration#

Various parameters SPI bit order, SPI clock, MOSI channel, MISO channel, SPI CS channel, bit length, SPI mode can be configured. Various parameters UART baud rate, bit length, parity, receive channel selection, transmit channel selection, stop bits can be configured with below given Enumerations.

  1. sl_sio_spi_event_t

  2. sl_sio_uart_event_t

  3. sl_sio_spi_mode_t

  4. sl_sio_spi_bit_width_t

  5. sl_sio_spi_msb_lsb_t

  6. sl_sio_spi_bit_length_t

  7. sl_sio_spi_parity_t

  8. sl_sio_spi_stop_bit_t

  • For more information on configuring available parameters refer to the respective peripheral example readme document.

Usage#

Data is transferred over SIO SPI after it has been initialized and configured. A callback API is then called to register the callback at the moment of the event. Before transfer has begin, chip select assert is to be done. In order to do this test, the MISO and MOSI pins must be connected in loopback mode.

After transfer completion, chip select de-assert is to be done using When the transfer complete event is generated, it compares the sent and received data.

  1. sl_si91x_sio_spi_pin_initialization

  2. sl_si91x_sio_spi_init

  3. sl_si91x_sio_spi_register_event_callback

  4. sl_si91x_sio_spi_cs_assert

  5. sl_si91x_sio_spi_transfer

  6. sl_si91x_sio_spi_cs_deassert

  7. sl_si91x_sio_deinit

Data is sent and received by SIO UART after it has been initiated and configured. A callback API is then called to register the callback at the moment of the event. Subsequently, the transfer buffer will transmit the required number of bytes, and the receive buffer will obtain the data bytes. It compares the sent and received data when the receive complete event is created.

  1. sl_si91x_sio_uart_pin_initialization

  2. sl_si91x_sio_uart_init

  1. sl_si91x_sio_uart_register_event_callback

  2. sl_si91x_sio_uart_send

  3. sl_si91x_sio_uart_read

  4. sl_si91x_sio_deinit

Modules#

sl_sio_version_t

sl_sio_spi_t

sl_sio_uart_t

sl_sio_i2c_t

Enumerations#

enum
SL_SIO_SPI_TX_DONE
SL_SIO_SPI_RX_DONE
}

SIO-SPI Events.

enum
SL_SIO_UART_TX_DONE
SL_SIO_UART_RX_DONE
SL_SIO_UART_PARITY_ERR
SL_SIO_UART_FRAMING_ERR
SL_SIO_UART_RECEIVE_CHAR
}

SIO-UART Events.

enum
SL_SIO_SPI_MODE_0 = 0
SL_SIO_SPI_MODE_3 = 3
}

SIO-SPI modes configurations.

enum
SL_SIO_SPI_BIT_8 = 8
SL_SIO_SPI_BIT_16 = 16
}

SIO-SPI bit width configurations.

enum
SL_SIO_SPI_LSB_FIRST = 0
SL_SIO_SPI_MSB_FIRST = 1
}

SIO-SPI MSB/LSB first configurations.

enum
SL_SIO_UART_BIT_8 = 8
SL_SIO_UART_BIT_16 = 16
}

SIO-UART bit length configurations.

enum
SL_SIO_UART_EVEN_PARITY = 0
SL_SIO_UART_ODD_PARITY = 1
}

SIO-UART parity configurations.

enum
SL_SIO_UART_STOP_BIT_1 = 1
SL_SIO_UART_STOP_BIT_2 = 2
}

SIO-UART stop bit configurations.

Typedefs#

typedef stc_sio_spi_cfg_t

SIO-SPI configuration structure.

typedef stc_sio_spi_xfer_t

SIO-SPI Transfer structure.

typedef stc_sio_i2s_config_t

SIO-I2S configuration structure.

typedef stc_sio_i2s_xfer_t

SIO-I2S Transfer structure.

typedef stc_sio_uart_config_t

SIO-UART configuration structure.

typedef sio_i2s_func_ptr_t

SIO-I2S callback function pointer.

typedef sio_Spi_func_ptr_t

SIO-SPI callback function pointer.

typedef sio_Uart_func_ptr_t

SIO_UART callback function pointer.

typedef stc_sio_i2c_config_t

SIO-I2C configuration structure.

Variables#

uint8_t

Release version number.

uint8_t

Major version number.

uint8_t

Minor version number.

uint8_t

SIO SPI CS port.

uint8_t

SIO SPI CS pin.

uint8_t

SIO SPI CS mux.

uint8_t

SIO SPI CS pad.

uint8_t

SIO SPI CLK port.

uint8_t

SIO SPI CLK pin.

uint8_t

SIO SPI CLK mux.

uint8_t

SIO SPI CLK pad.

uint8_t

SIO SPI MOSI port.

uint8_t

SIO SPI MOSI pin.

uint8_t

SIO SPI MOSI mux.

uint8_t

SIO SPI MOSI pad.

uint8_t

SIO SPI MISO port.

uint8_t

SIO SPI MISO pin.

uint8_t

SIO SPI MISO mux.

uint8_t

SIO SPI MISO pad.

uint8_t

SIO UART TX port.

uint8_t

SIO UART TX pin.

uint8_t

SIO UART TX mux.

uint8_t

SIO UART TX pad.

uint8_t

SIO UART RX port.

uint8_t

SIO UART RX pin.

uint8_t

SIO UART RX mux.

uint8_t

SIO UART RX pad.

uint8_t

SIO I2C SDA port.

uint8_t

SIO I2C SDA pin.

uint8_t

SIO I2C SDA mux.

uint8_t

SIO I2C SDA pad.

uint8_t

SIO I2C SCL port.

uint8_t

SIO I2C SCL pin.

uint8_t

SIO I2C SCL mux.

uint8_t

SIO I2C SCL pad.

Functions#

sl_status_t

Initialize the SIO module.

sl_status_t
sl_si91x_sio_spi_init(sl_sio_spi_config_t *configuration)

Initialize the SIO-SPI module.

void

This API is used to De-initialize SIO module.

sl_status_t
sl_si91x_sio_spi_pin_initialization(sl_sio_spi_t *sio_spi_init)

Initialize SIO SPI pins and clock.

sl_status_t
sl_si91x_sio_uart_pin_initialization(sl_sio_uart_t *sio_uart_init)

Initialize SIO UART pins and clock.

sl_status_t
sl_si91x_sio_i2c_pin_initialization(sl_sio_i2c_t *sio_i2c_init)

Initialize SIO I2C pins and clock.

sl_status_t
sl_si91x_sio_spi_cs_assert(uint8_t chip_select_num)

Assert the SIO SPI chip select.

sl_status_t
sl_si91x_sio_spi_cs_deassert(uint8_t chip_select_num)

De-assert the SIO SPI chip select.

sl_status_t
sl_si91x_sio_spi_register_event_callback(sl_sio_spi_callback_t callback_event)

Register the user callback function.

void

Un-register the user callback function, i.e., clear the callback function address and disables IRQ handler.

sl_status_t
sl_si91x_sio_spi_transfer(sl_sio_spi_xfer_config_t *xfer_config)

Transfer the SIO SPI data.

Get the SIO version.

sl_status_t
sl_si91x_sio_uart_init(sl_sio_uart_config_t *configuration)

Initialize SIO-UART, i.e., set baud rate, parity, channel selection, stop bits, and data length.

sl_status_t
sl_si91x_sio_uart_send(const void *buffer, uint16_t length)

Send the data over SIO-UART in non-blocking mode.

sl_status_t
sl_si91x_sio_uart_send_blocking(const void *buffer, uint16_t length)

Send the data over SIO-UART in blocking mode.

sl_status_t
sl_si91x_sio_uart_read(void *data_buffer, uint16_t num_bytes)

Read data from SIO-UART in non-blocking mode.

sl_status_t
sl_si91x_sio_uart_read_blocking(void *data_buffer, uint16_t num_bytes)

Read data from UART in blocking mode.

sl_status_t
sl_si91x_sio_uart_register_event_callback(sl_sio_uart_callback_t callback_event)

Register the user callback function.

sl_status_t
sl_si91x_sio_i2c_write(stc_sio_i2c_config_t *configuration, uint8_t address, uint8_t *data, uint16_t length)

Write data using SIO-I2C.

sl_status_t
sl_si91x_sio_i2c_read(stc_sio_i2c_config_t *configuration, uint8_t address, uint8_t *data, uint16_t length)

Read data using SIO-I2C.

sl_status_t
sl_si91x_sio_i2c_transfer(stc_sio_i2c_config_t *configuration, uint8_t address, uint8_t *tx_buffer, uint16_t tx_length, uint8_t *rx_buffer, uint16_t rx_length)

Transfer data using SIO-I2C.

void

Generate I2C start in SIO.

void

Generate I2C stop in SIO.

void

Un-register the user callback function.

void

Used when UART receive is done.

sl_status_t
sl_si91x_sio_configure_interrupt(en_sio_channels_t channel, interrupt_flag_t flag)

Configure pin detection mode to be considered for GPIO interrupt.

sl_status_t
sl_si91x_sio_match_pattern(en_sio_channels_t channel, pattern_match_t pattern, uint8_t slice, uint32_t slice_pattern)

Match the pattern with data to be detected.

sl_status_t
sl_si91x_sio_shift_clock(uint32_t divider, en_sio_channels_t channel)

Generate the shift clock.

sl_status_t
sl_si91x_sio_select_clock(en_sio_channels_t channel, clock_type_t clock)

Select SIO peripheral clock.

sl_status_t
sl_si91x_sio_position_counter(en_sio_channels_t channel, uint32_t data_shift)

Shift the number of bits.

sl_status_t
sl_si91x_sio_control_flow(en_sio_channels_t channel, flow_control_t flow_control)

Enable/disable the flow control bit.

sl_status_t
sl_si91x_sio_reverse_load(en_sio_channels_t channel, reverse_load_t reverse)

Load data to buffer in reverse order.

sl_status_t
sl_si91x_sio_set_interrupt(en_sio_channels_t channel)

Enable the common swap interrupt.

sl_status_t
sl_si91x_sio_clear_interrupt(en_sio_channels_t channel)

Disable the common swap interrupt.

sl_status_t
sl_si91x_sio_mask_interrupt(en_sio_channels_t channel)

Mask the common swap interrupt.

sl_status_t
sl_si91x_sio_unmask_interrupt(en_sio_channels_t channel)

Unmask the common swap interrupt.

uint32_t

Read the common swap interrupt status.

sl_status_t
sl_si91x_sio_set_shift_interrupt(en_sio_channels_t channel)

Enable the common shift interrupt.

sl_status_t
sl_si91x_sio_clear_shift_interrupt(en_sio_channels_t channel)

Disable the common shift interrupt.

sl_status_t
sl_si91x_sio_mask_shift_interrupt(en_sio_channels_t channel)

Mask the common shift interrupt.

sl_status_t
sl_si91x_sio_unmask_shift_interrupt(en_sio_channels_t channel)

Unmask the common shift interrupt.

uint32_t

Read the common shift interrupt status.

sl_status_t
sl_si91x_sio_edge_select(en_sio_channels_t channel, edge_select_t edge_sel)

Select edge of the clock cycle for sampling bits.

uint32_t
sl_si91x_sio_read_buffer(en_sio_channels_t channel)

Read SIO buffer register.

sl_status_t
sl_si91x_sio_write_buffer(en_sio_channels_t channel, uint32_t data)

Write into SIO buffer register.

Macros#

#define

SIO-SPI channel 0.

#define

SIO-SPI channel 1.

#define

SIO-SPI channel 2.

#define

SIO-SPI channel 3.

#define

SIO-SPI channel 4.

#define

SIO-SPI channel 5.

#define

SIO-SPI channel 6.

#define

SIO-SPI channel 7.

Enumeration Documentation#

sl_sio_spi_event_t#

sl_sio_spi_event_t

SIO-SPI Events.

Enumerator
SL_SIO_SPI_TX_DONE

SIO-SPI Transfer done event.

SL_SIO_SPI_RX_DONE

SIO-SPI Receive done event.


Definition at line 83 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_uart_event_t#

sl_sio_uart_event_t

SIO-UART Events.

Enumerator
SL_SIO_UART_TX_DONE

SIO-UART transfer done event.

SL_SIO_UART_RX_DONE

SIO-UART receive done event.

SL_SIO_UART_PARITY_ERR

SIO-UART parity error.

SL_SIO_UART_FRAMING_ERR

SIO-UART framing error.

SL_SIO_UART_RECEIVE_CHAR

SIO-UART receive character.


Definition at line 89 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_spi_mode_t#

sl_sio_spi_mode_t

SIO-SPI modes configurations.

Enumerator
SL_SIO_SPI_MODE_0

SIO-SPI mode 0.

SL_SIO_SPI_MODE_3

SIO-SPI mode 3.


Definition at line 98 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_spi_bit_width_t#

sl_sio_spi_bit_width_t

SIO-SPI bit width configurations.

Enumerator
SL_SIO_SPI_BIT_8

SIO-SPI bit width 8.

SL_SIO_SPI_BIT_16

SIO-SPI bit width 16.


Definition at line 104 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_spi_msb_lsb_t#

sl_sio_spi_msb_lsb_t

SIO-SPI MSB/LSB first configurations.

Enumerator
SL_SIO_SPI_LSB_FIRST

SIO-SPI LSB first.

SL_SIO_SPI_MSB_FIRST

SIO-SPI MSB first.


Definition at line 110 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_spi_bit_length_t#

sl_sio_spi_bit_length_t

SIO-UART bit length configurations.

Enumerator
SL_SIO_UART_BIT_8

SIO-SPI bit length 8.

SL_SIO_UART_BIT_16

SIO-SPI bit length 16.


Definition at line 116 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_spi_parity_t#

sl_sio_spi_parity_t

SIO-UART parity configurations.

Enumerator
SL_SIO_UART_EVEN_PARITY

SIO-SPI even parity.

SL_SIO_UART_ODD_PARITY

SIO-SPI odd parity.


Definition at line 122 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_spi_stop_bit_t#

sl_sio_spi_stop_bit_t

SIO-UART stop bit configurations.

Enumerator
SL_SIO_UART_STOP_BIT_1

SIO-UART stop bit 1.

SL_SIO_UART_STOP_BIT_2

SIO-UART stop bit 2.


Definition at line 128 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

Typedef Documentation#

sl_sio_spi_config_t#

typedef stc_sio_spi_cfg_t sl_sio_spi_config_t

SIO-SPI configuration structure.


Definition at line 61 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_spi_xfer_config_t#

typedef stc_sio_spi_xfer_t sl_sio_spi_xfer_config_t

SIO-SPI Transfer structure.


Definition at line 62 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_i2s_config_t#

typedef stc_sio_i2s_config_t sl_sio_i2s_config_t

SIO-I2S configuration structure.


Definition at line 63 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_i2s_xfer_config_t#

typedef stc_sio_i2s_xfer_t sl_sio_i2s_xfer_config_t

SIO-I2S Transfer structure.


Definition at line 64 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_uart_config_t#

typedef stc_sio_uart_config_t sl_sio_uart_config_t

SIO-UART configuration structure.


Definition at line 65 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_i2s_callback_t#

typedef sio_i2s_func_ptr_t sl_sio_i2s_callback_t

SIO-I2S callback function pointer.


Definition at line 66 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_spi_callback_t#

typedef sio_Spi_func_ptr_t sl_sio_spi_callback_t

SIO-SPI callback function pointer.


Definition at line 67 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_uart_callback_t#

typedef sio_Uart_func_ptr_t sl_sio_uart_callback_t

SIO_UART callback function pointer.


Definition at line 68 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_sio_i2c_config_t#

typedef stc_sio_i2c_config_t sl_sio_i2c_config_t

SIO-I2C configuration structure.


Definition at line 69 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

Variable Documentation#

release#

uint8_t sl_sio_version_t::release

Release version number.


Definition at line 138 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

major#

uint8_t sl_sio_version_t::major

Major version number.


Definition at line 139 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

minor#

uint8_t sl_sio_version_t::minor

Minor version number.


Definition at line 140 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_cs_port#

uint8_t sl_sio_spi_t::spi_cs_port

SIO SPI CS port.


Definition at line 145 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_cs_pin#

uint8_t sl_sio_spi_t::spi_cs_pin

SIO SPI CS pin.


Definition at line 146 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_cs_mux#

uint8_t sl_sio_spi_t::spi_cs_mux

SIO SPI CS mux.


Definition at line 147 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_cs_pad#

uint8_t sl_sio_spi_t::spi_cs_pad

SIO SPI CS pad.


Definition at line 148 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_clk_port#

uint8_t sl_sio_spi_t::spi_clk_port

SIO SPI CLK port.


Definition at line 149 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_clk_pin#

uint8_t sl_sio_spi_t::spi_clk_pin

SIO SPI CLK pin.


Definition at line 150 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_clk_mux#

uint8_t sl_sio_spi_t::spi_clk_mux

SIO SPI CLK mux.


Definition at line 151 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_clk_pad#

uint8_t sl_sio_spi_t::spi_clk_pad

SIO SPI CLK pad.


Definition at line 152 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_mosi_port#

uint8_t sl_sio_spi_t::spi_mosi_port

SIO SPI MOSI port.


Definition at line 153 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_mosi_pin#

uint8_t sl_sio_spi_t::spi_mosi_pin

SIO SPI MOSI pin.


Definition at line 154 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_mosi_mux#

uint8_t sl_sio_spi_t::spi_mosi_mux

SIO SPI MOSI mux.


Definition at line 155 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_mosi_pad#

uint8_t sl_sio_spi_t::spi_mosi_pad

SIO SPI MOSI pad.


Definition at line 156 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_miso_port#

uint8_t sl_sio_spi_t::spi_miso_port

SIO SPI MISO port.


Definition at line 157 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_miso_pin#

uint8_t sl_sio_spi_t::spi_miso_pin

SIO SPI MISO pin.


Definition at line 158 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_miso_mux#

uint8_t sl_sio_spi_t::spi_miso_mux

SIO SPI MISO mux.


Definition at line 159 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

spi_miso_pad#

uint8_t sl_sio_spi_t::spi_miso_pad

SIO SPI MISO pad.


Definition at line 160 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

uart_tx_port#

uint8_t sl_sio_uart_t::uart_tx_port

SIO UART TX port.


Definition at line 165 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

uart_tx_pin#

uint8_t sl_sio_uart_t::uart_tx_pin

SIO UART TX pin.


Definition at line 166 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

uart_tx_mux#

uint8_t sl_sio_uart_t::uart_tx_mux

SIO UART TX mux.


Definition at line 167 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

uart_tx_pad#

uint8_t sl_sio_uart_t::uart_tx_pad

SIO UART TX pad.


Definition at line 168 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

uart_rx_port#

uint8_t sl_sio_uart_t::uart_rx_port

SIO UART RX port.


Definition at line 169 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

uart_rx_pin#

uint8_t sl_sio_uart_t::uart_rx_pin

SIO UART RX pin.


Definition at line 170 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

uart_rx_mux#

uint8_t sl_sio_uart_t::uart_rx_mux

SIO UART RX mux.


Definition at line 171 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

uart_rx_pad#

uint8_t sl_sio_uart_t::uart_rx_pad

SIO UART RX pad.


Definition at line 172 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

i2c_sda_port#

uint8_t sl_sio_i2c_t::i2c_sda_port

SIO I2C SDA port.


Definition at line 177 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

i2c_sda_pin#

uint8_t sl_sio_i2c_t::i2c_sda_pin

SIO I2C SDA pin.


Definition at line 178 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

i2c_sda_mux#

uint8_t sl_sio_i2c_t::i2c_sda_mux

SIO I2C SDA mux.


Definition at line 179 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

i2c_sda_pad#

uint8_t sl_sio_i2c_t::i2c_sda_pad

SIO I2C SDA pad.


Definition at line 180 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

i2c_scl_port#

uint8_t sl_sio_i2c_t::i2c_scl_port

SIO I2C SCL port.


Definition at line 181 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

i2c_scl_pin#

uint8_t sl_sio_i2c_t::i2c_scl_pin

SIO I2C SCL pin.


Definition at line 182 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

i2c_scl_mux#

uint8_t sl_sio_i2c_t::i2c_scl_mux

SIO I2C SCL mux.


Definition at line 183 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

i2c_scl_pad#

uint8_t sl_sio_i2c_t::i2c_scl_pad

SIO I2C SCL pad.


Definition at line 184 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

Function Documentation#

sl_si91x_sio_init#

sl_status_t sl_si91x_sio_init (void)

Initialize the SIO module.

Parameters
N/A

It initializes the SIO GPIO's and enables the SIO module clock.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_FAIL (0x0001) - Fail, SIO initialization failed

    • SL_STATUS_OK (0x0000) - Success, SIO initialization successful


Definition at line 201 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_spi_init#

sl_status_t sl_si91x_sio_spi_init (sl_sio_spi_config_t *configuration)

Initialize the SIO-SPI module.

Parameters
[in]configuration

- Pointer to SIO-SPI configuration structure sl_sio_spi_config_t

It configures the SPI mode, bit length, bit order, SIO frequency, and the SIO channels for the SPI transfer lines.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success, SPI initialization done properly


Definition at line 217 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_deinit#

void sl_si91x_sio_deinit (void)

This API is used to De-initialize SIO module.

Parameters
N/A

Returns

  • none


Definition at line 224 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_spi_pin_initialization#

sl_status_t sl_si91x_sio_spi_pin_initialization (sl_sio_spi_t *sio_spi_init)

Initialize SIO SPI pins and clock.

Parameters
[in]sio_spi_init

: Pointer to the structure of type sl_sio_spi_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_OK - Success

    • SL_STATUS_NULL_POINTER - The parameter is a null pointer


Definition at line 234 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_pin_initialization#

sl_status_t sl_si91x_sio_uart_pin_initialization (sl_sio_uart_t *sio_uart_init)

Initialize SIO UART pins and clock.

Parameters
[in]sio_uart_init

: Pointer to the structure of type sl_sio_uart_t

This holds the UART Tx, Rx pins configuration.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_OK - Success

    • SL_STATUS_NULL_POINTER - The parameter is a null pointer


Definition at line 247 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_i2c_pin_initialization#

sl_status_t sl_si91x_sio_i2c_pin_initialization (sl_sio_i2c_t *sio_i2c_init)

Initialize SIO I2C pins and clock.

Parameters
[in]sio_i2c_init

: Pointer to the structure of type sl_sio_i2c_t

This holds the I2C SDA, SCL pins configuration.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_OK - Success

    • SL_STATUS_NULL_POINTER - The parameter is a null pointer


Definition at line 260 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_spi_cs_assert#

sl_status_t sl_si91x_sio_spi_cs_assert (uint8_t chip_select_num)

Assert the SIO SPI chip select.

Parameters
[in]chip_select_num

- Chip select number (0 to 7)

This tells peripheral that it should wake up and receive / send data and is also used when multiple peripherals are present to select the one you'd like to communicate with.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success


Definition at line 277 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_spi_cs_deassert#

sl_status_t sl_si91x_sio_spi_cs_deassert (uint8_t chip_select_num)

De-assert the SIO SPI chip select.

Parameters
[in]chip_select_num

- Chip select number (0 to 7)

This is used to disable after the last byte is transmitted / received.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success


Definition at line 294 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_spi_register_event_callback#

sl_status_t sl_si91x_sio_spi_register_event_callback (sl_sio_spi_callback_t callback_event)

Register the user callback function.

Parameters
[in]callback_event

- Pointer to the function sl_sio_spi_callback_t which needs to be called at the time of interrupt.

It registers the callback, i.e., stores the callback function address and pass to the variable that is called in Interrupt Handler. If another callback is registered without unregistering previous callback then, it returns an error code, so it is mandatory to unregister the callback before registering another callback. It will returns error if any callback is already registered.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_BUSY (0x0004) - Driver is busy


Definition at line 314 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_spi_unregister_event_callback#

void sl_si91x_sio_spi_unregister_event_callback (void)

Un-register the user callback function, i.e., clear the callback function address and disables IRQ handler.

Parameters
N/A

Returns

  • none


Definition at line 326 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_spi_transfer#

sl_status_t sl_si91x_sio_spi_transfer (sl_sio_spi_xfer_config_t *xfer_config)

Transfer the SIO SPI data.

Parameters
[in]xfer_config

- Pointer to SIO-SPI transfer configuration structure sl_sio_spi_xfer_config_t

It is used to make the SIO-SPI transfer in non-blocking mode.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success


Definition at line 344 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_get_version#

sl_sio_version_t sl_si91x_sio_get_version (void)

Get the SIO version.

Parameters
N/A

It is used to get the release, SQA and DEV version of the SIO module. Returns


Definition at line 352 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_init#

sl_status_t sl_si91x_sio_uart_init (sl_sio_uart_config_t *configuration)

Initialize SIO-UART, i.e., set baud rate, parity, channel selection, stop bits, and data length.

Parameters
[in]configuration

- Pointer to SIO-UART configuration structure sl_sio_uart_config_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success, UART initialization done properly


Definition at line 367 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_send#

sl_status_t sl_si91x_sio_uart_send (const void *buffer, uint16_t length)

Send the data over SIO-UART in non-blocking mode.

Parameters
[in]buffer

- data pointer to send

[in]length

- data length

Transmit bytes from the buffer using an interrupt service. Will return immediately, but cannot be called again until the previous call has finished.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success


Definition at line 384 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_send_blocking#

sl_status_t sl_si91x_sio_uart_send_blocking (const void *buffer, uint16_t length)

Send the data over SIO-UART in blocking mode.

Parameters
[in]buffer

- data pointer to send

[in]length

- number of bytes to send

Transmit bytes from the buffer using a blocking send byte function. Does not return until all bytes are sent.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success


Definition at line 401 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_read#

sl_status_t sl_si91x_sio_uart_read (void *data_buffer, uint16_t num_bytes)

Read data from SIO-UART in non-blocking mode.

Parameters
[out]data_buffer

- data buffer pointer to read

[in]num_bytes

- number of bytes read

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success


Definition at line 417 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_read_blocking#

sl_status_t sl_si91x_sio_uart_read_blocking (void *data_buffer, uint16_t num_bytes)

Read data from UART in blocking mode.

Parameters
[out]data_buffer

- data buffer pointer to read

[in]num_bytes

- number of bytes read

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success


Definition at line 434 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_register_event_callback#

sl_status_t sl_si91x_sio_uart_register_event_callback (sl_sio_uart_callback_t callback_event)

Register the user callback function.

Parameters
[in]callback_event

- Pointer to the function sl_sio_uart_callback_t which needs to be called at the time of interrupt.

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_OK (0x0000) - Success

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_BUSY (0x0004) - Driver is busy


Definition at line 449 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_i2c_write#

sl_status_t sl_si91x_sio_i2c_write (stc_sio_i2c_config_t *configuration, uint8_t address, uint8_t *data, uint16_t length)

Write data using SIO-I2C.

Parameters
[in]configuration

- pointer to the I2C configuration structure stc_sio_i2c_config_t in SIO module

[in]address

- slave address(1- 255).

[in]data

- pointer to the data

[in]length

- data length

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 467 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_i2c_read#

sl_status_t sl_si91x_sio_i2c_read (stc_sio_i2c_config_t *configuration, uint8_t address, uint8_t *data, uint16_t length)

Read data using SIO-I2C.

Parameters
[in]configuration

- pointer to the I2C configuration structure stc_sio_i2c_config_t in SIO module

[in]address

- slave address(1- 255).

[out]data

- pointer to the data

[in]length

- data length

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 490 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_i2c_transfer#

sl_status_t sl_si91x_sio_i2c_transfer (stc_sio_i2c_config_t *configuration, uint8_t address, uint8_t *tx_buffer, uint16_t tx_length, uint8_t *rx_buffer, uint16_t rx_length)

Transfer data using SIO-I2C.

Parameters
[in]configuration

- Pointer to the I2C configuration structure stc_sio_i2c_config_t in SIO module

[in]address

- Slave address (1- 255).

[in]tx_buffer

- Pointer to the data transmit buffer

[in]tx_length

- TX data length

[out]rx_buffer

- Pointer to the data receive buffer

[in]rx_length

- RX data length

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 510 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_i2c_generate_start#

void sl_si91x_sio_i2c_generate_start (void)

Generate I2C start in SIO.

Parameters
N/A

Returns

  • none


Definition at line 524 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_i2c_generate_stop#

void sl_si91x_sio_i2c_generate_stop (void)

Generate I2C stop in SIO.

Parameters
N/A

Returns

  • none


Definition at line 536 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_unregister_event_callback#

void sl_si91x_sio_uart_unregister_event_callback (void)

Un-register the user callback function.

Parameters
N/A

Returns

  • none


Definition at line 548 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_uart_rx_done#

void sl_si91x_sio_uart_rx_done (void)

Used when UART receive is done.

Parameters
N/A

Returns

  • none


Definition at line 560 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_configure_interrupt#

sl_status_t sl_si91x_sio_configure_interrupt (en_sio_channels_t channel, interrupt_flag_t flag)

Configure pin detection mode to be considered for GPIO interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

[in]flag

- GPIO interrupt generated interrupt_flag_t

  • Rise edge: 0

  • Fall edge: 1

  • Level 0: 2

  • Level 1: 3

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 578 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_match_pattern#

sl_status_t sl_si91x_sio_match_pattern (en_sio_channels_t channel, pattern_match_t pattern, uint8_t slice, uint32_t slice_pattern)

Match the pattern with data to be detected.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

[in]pattern

- Pattern match bit to be enabled for pattern match to take place pattern_match_t

  • Pattern match disable: 0

  • Pattern match enable: 1

[in]slice

- Slice number (0,1,2,8,9,10) to select.

[in]slice_pattern

- Pattern to match for selected slice

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 596 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_shift_clock#

sl_status_t sl_si91x_sio_shift_clock (uint32_t divider, en_sio_channels_t channel)

Generate the shift clock.

Parameters
[in]divider

- Desired clock frequency configuration

[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 613 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_select_clock#

sl_status_t sl_si91x_sio_select_clock (en_sio_channels_t channel, clock_type_t clock)

Select SIO peripheral clock.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

[in]clock

- Clock used for shift operations clock_type_t

  • Internal clock: 0

  • External clock: 1

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 632 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_position_counter#

sl_status_t sl_si91x_sio_position_counter (en_sio_channels_t channel, uint32_t data_shift)

Shift the number of bits.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

[in]data_shift

- Number of shifts to happen before reloading register with data. Value to be set = (total no. of valid bits in shift register/ no. of bits per shift) - 1

Number of shifts to happen before reloading the shift register with data/pausing the operation. i.e. value to be set = (total no. of valid bits in shift register/ number of bits per shift) – 1

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 649 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_control_flow#

sl_status_t sl_si91x_sio_control_flow (en_sio_channels_t channel, flow_control_t flow_control)

Enable/disable the flow control bit.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

[in]flow_control

- It decides whether to continue data shifting based on data present in shift register validation flow_control_t

  • Flow control disable: 0

  • Flow control enable: 1

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 666 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_reverse_load#

sl_status_t sl_si91x_sio_reverse_load (en_sio_channels_t channel, reverse_load_t reverse)

Load data to buffer in reverse order.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

[in]reverse

- If data to be shifted out MSB first, it is to be set reverse_load_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 680 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_set_interrupt#

sl_status_t sl_si91x_sio_set_interrupt (en_sio_channels_t channel)

Enable the common swap interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 693 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_clear_interrupt#

sl_status_t sl_si91x_sio_clear_interrupt (en_sio_channels_t channel)

Disable the common swap interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 709 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_mask_interrupt#

sl_status_t sl_si91x_sio_mask_interrupt (en_sio_channels_t channel)

Mask the common swap interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 722 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_unmask_interrupt#

sl_status_t sl_si91x_sio_unmask_interrupt (en_sio_channels_t channel)

Unmask the common swap interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 735 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_get_interrupt_status#

uint32_t sl_si91x_sio_get_interrupt_status (void)

Read the common swap interrupt status.

Parameters
N/A

Returns

  • returns interrupt status


Definition at line 744 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_set_shift_interrupt#

sl_status_t sl_si91x_sio_set_shift_interrupt (en_sio_channels_t channel)

Enable the common shift interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 757 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_clear_shift_interrupt#

sl_status_t sl_si91x_sio_clear_shift_interrupt (en_sio_channels_t channel)

Disable the common shift interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 770 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_mask_shift_interrupt#

sl_status_t sl_si91x_sio_mask_shift_interrupt (en_sio_channels_t channel)

Mask the common shift interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 783 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_unmask_shift_interrupt#

sl_status_t sl_si91x_sio_unmask_shift_interrupt (en_sio_channels_t channel)

Unmask the common shift interrupt.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 796 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_shift_interrupt_status#

uint32_t sl_si91x_sio_shift_interrupt_status (void)

Read the common shift interrupt status.

Parameters
[in]

- SIO channel to be selected en_sio_channels_t

Returns

  • returns shift interrupt status


Definition at line 805 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_edge_select#

sl_status_t sl_si91x_sio_edge_select (en_sio_channels_t channel, edge_select_t edge_sel)

Select edge of the clock cycle for sampling bits.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

[in]edge_sel

- Select the edge for bit sample to start edge_select_t

  • Positive edge: 0

  • Negative edge: 1

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 821 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_read_buffer#

uint32_t sl_si91x_sio_read_buffer (en_sio_channels_t channel)

Read SIO buffer register.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

Returns

  • returns data from buffer


Definition at line 833 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

sl_si91x_sio_write_buffer#

sl_status_t sl_si91x_sio_write_buffer (en_sio_channels_t channel, uint32_t data)

Write into SIO buffer register.

Parameters
[in]channel

- SIO channel to be selected en_sio_channels_t

[in]data

- Data to be written to buffer

Returns

  • returns status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is an invalid argument

    • SL_STATUS_NULL_POINTER (0x0022n) - The parameter is null pointer

    • SL_STATUS_OK (0X000) - Success


Definition at line 850 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

Macro Definition Documentation#

SL_SIO_CH_0#

#define SL_SIO_CH_0
Value:
0

SIO-SPI channel 0.


Definition at line 52 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

SL_SIO_CH_1#

#define SL_SIO_CH_1
Value:
1

SIO-SPI channel 1.


Definition at line 53 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

SL_SIO_CH_2#

#define SL_SIO_CH_2
Value:
2

SIO-SPI channel 2.


Definition at line 54 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

SL_SIO_CH_3#

#define SL_SIO_CH_3
Value:
3

SIO-SPI channel 3.


Definition at line 55 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

SL_SIO_CH_4#

#define SL_SIO_CH_4
Value:
4

SIO-SPI channel 4.


Definition at line 56 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

SL_SIO_CH_5#

#define SL_SIO_CH_5
Value:
5

SIO-SPI channel 5.


Definition at line 57 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

SL_SIO_CH_6#

#define SL_SIO_CH_6
Value:
6

SIO-SPI channel 6.


Definition at line 58 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h

SL_SIO_CH_7#

#define SL_SIO_CH_7
Value:
7

SIO-SPI channel 7.


Definition at line 59 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sio.h