Sensor Hub#


Introduction#

  • Sensor Hub products are primarily intended to address consumer, industrial, and medical applications that require wireless connectivity, extremely low power, and high performance for sensor fusion algorithms. The MCU core, wireless connectivity, and peripherals are identical to the SI917 CCP Radio board.

  • Sensor Hub functions as a sensor management system, facilitating hardware abstraction layer, peripheral drivers, and sensor driver layer integration to collect and distribute desired sensor data.

  • It enables users to collect sensor data based on time interval or number of samples or when a specific data requirement are met.

  • Sensor Hub serves as a framework that can be seamlessly integrated into any application requiring sensor management.

  • The Sensor HUB works with sensors as per configurations provided by the application and notifies the necessary events throughout the application.

  • The configuration for the sensors must be provided through the sensor hub config file on which the sensor hub should act.

  • Sensor Hub relies on FreeRTOS using CMSIS RTOS version 2 wrapper.


Configuration#

  • Sensor Hub has 2 Sensor Mode:

  • SL_SH_POLLING_MODE: This mode is Timer based.

  • SL_SH_INTERRUPT_MODE: This mode is NPSS Button 0 GPIO Interrupt based.

  • There are 3 types of data_deliver.mode in Polling Sensor Mode and they are SL_SH_THRESHOLD, SL_SH_TIMEOUT and SL_SH_NUM_OF_SAMPLES.

  • SL_SH_NO_DATA data_deliver.mode is used when Interrupt Sensor Mode is selected.

  • If the user wants a value that sets a limit or boundary, above which the sensor data should be shown then SL_SH_THRESHOLD mode should be chosen

  • SL_SH_TIMEOUT mode is used when user wants to get the data at some intervals of time for some sampling time

  • SL_SH_NUM_OF_SAMPLES mode is used when user wants to get the particular number of sensor data 

  • SL_SH_NO_DATA mode is used when .

  • Here data_deliver.timeout is the time for which the sensor should keep collecting the data for.

  • sampling_interval is the the amount of time between two sensor data read is sampled or collected.

  • sampling_intr_req_pin is the GPIO pin for sampling the sensor data

  • Configure the number of sensors info in the **\sensors\inc\sensors_config.h** file

    #define SL_MAX_NUM_SENSORS              5   // Maximum sensors present in the system
    
  • Modes: Using the configuration structure, one can configure the following parameters in the sensorhub_config.c file:

    • For POLLING Sensor Mode configure the below parameters:

      .sensor_mode                = SL_SH_POLLING_MODE,
      .sampling_interval          = 100,
      
      • If sensor_mode is selected as SL_SH_POLLING_MODE, then data_deliver.mode should be configured as one of the following for a sensor configuration structure:

        • For TIMEOUT Data Mode configure the below parameters:

          .data_deliver.mode          = SL_SH_TIMEOUT,
          .data_deliver.timeout       = 1000,
          
        • For THRESHOLD Data Mode configure the below parameters:

          .data_deliver.mode          = SL_SH_THRESHOLD,
          .data_deliver.threshold     = 1000,
          
        • For SAMPLING Data Mode configure the below parameters:

          .data_deliver.mode          = SL_SH_NUM_OF_SAMPLES,
          .data_deliver.numOfSamples  = 5,
          
    • For INTERRUPT Sensor Mode configure the below parameters:

      .sensor_mode                = SL_SH_INTERRUPT_MODE,
      .sampling_intr_req_pin      = BUTTON_0_GPIO_PIN,
      .sensor_intr_type           = SL_SH_FALL_EDGE,
      .data_deliver.data_mode     = SL_SH_NO_DATA_MODE,
      
  • To configure the PS2, please update the below macro in the preprocessor settings:

    SL_SENSORHUB_POWERSAVE=1
    Enabling this macro will move the application from PS4 state to PS2 state. In PS2 state the sensor data will be sampled and collected.
    
  • To configure the power states to PS4 sleep or PS2 Sleep, please update the defines in ***\gecko_sdk_4.3.2\util\third_party\freertos\kernel.h** file as below:

    #ifndef configUSE_TICKLESS_IDLE
    #define configUSE_TICKLESS_IDLE 1           // 1 is to Enable the tickless Idle mode
    #endif
    
    #ifndef configPRE_SLEEP_PROCESSING
    #define configPRE_SLEEP_PROCESSING(x) sli_si91x_sleep_wakeup(x)               // Here x is idle time,
    #endif
    
    // Configure the sleep time by using the below macro.
    // If the number of Ideal task ticks exceeds this value, the system is allowed to sleep.
    #ifndef configEXPECTED_IDLE_TIME_BEFORE_SLEEP
       #define configEXPECTED_IDLE_TIME_BEFORE_SLEEP    70
    #endif
    

    Note:

  • By using above sleep configuration, sensor hub is going to sleep by using the idle task and idle time.

  • If the Ideal time exceeds the expected sleep time value, the system is allowed to sleep.

  • The above idle time is fed to the Alarm timer, which we are using as a wake-up source.

ADC Configurations: Configure only below parameters for ADC to change its mode from FIFO to STATIC and vice versa

  • For ADC FIFO mode, configure as shown below:

    .adc_config.adc_cfg.operation_mode        = SL_ADC_FIFO_MODE,
    .adc_config.adc_ch_cfg.sampling_rate[0]   = SL_SH_ADC_SAMPLING_RATE, // Use 100 for FIFO Mode
    
  • For ADC Static mode, configure as shown below:

    .adc_config.adc_cfg.operation_mode        = SL_ADC_STATIC_MODE,
    .adc_config.adc_ch_cfg.sampling_rate[0]   = SL_SH_ADC_SAMPLING_RATE, // Use 1000 for Static Mode
    
  • To configure the PS1 power state from PS2 State, please update the below macro in the preprocessor settings:

    SL_SH_ADC_PS1=1
     Enabling this macro will move the core from PS2 Active state to PS1 state
    
    • Please update the defines in ***\gecko_sdk_4.3.2\util\third_party\freertos\kernel.h** file as below:

      #ifndef configUSE_TICKLESS_IDLE
      #define configUSE_TICKLESS_IDLE 1           // 1 is to Enable the tickless Idle mode
      #endif
      
      #ifndef configPRE_SLEEP_PROCESSING
      #define configPRE_SLEEP_PROCESSING(x) sli_si91x_sleep_wakeup(x)               // Here x is idle time,
      #endif
      

      Note:

    • The PS1 state transition only applies to ADC FIFO Mode. Before entering this mode, kindly turn off any other sensors.


Usage#

Sensorhub provides two apis which user can use for intergrating into any application

  • sl_si91x_sensorhub_app_task(void);

  • sl_si91x_sensor_event_handler(uint8_t sensor_id, uint8_t event);

sl_si91x_sensorhub_app_task(void): initialises and starts sensor data collection. it achieves this by calling the following apis

sl_si91x_sensorhub_notify_cb_register(sl_sensor_signalEvent_t cb_event, sl_sensor_id_t *cb_ack): links the event handler provided by the user as a callback function in the event task

sl_si91x_sensorhub_init(): initializes the peripherals I2C, SPI, ADC, SDC

sl_si91x_sensorhub_detect_sensors(sl_sensor_id_t *sensor_id_info, uint8_t num_of_sensors): scans the i2c sensors provided in the sensorhub_config.c and returns the number of these sensors that are currently connected

sl_si91x_sensorhub_create_sensor(sl_sensor_id_t sensor_id): Initializes the sensor by calling the init function of the sensor provided by the user in the respective HAL, Assigs memory to it based on the data delivery mode, Creates a timer for this sensor if required

sl_si91x_sensor_hub_start(): initializes the sensor task, event task and power task

sl_si91x_sensorhub_start_sensor(sl_sensor_id_t sensor_id): starts the timers of the sensors created in create sensor api

sl_si91x_sensor_event_handler(uint8_t sensor_id, uint8_t event) is called by the event task after sensor data is collected ,in the sensorhub appilcation it prints the data based on the sensor id and uploads it to the cloud

Modules#

sl_sensorhub_errors_t

sl_data_deliver_type_t

sl_sensor_info_t

sl_sensor_handle_t

sl_sensor_list_t

sl_intr_list_t

sl_intr_list_map_t

sl_em_event_t

sl_sensor_cb_info_t

sl_i2c_config_t

sl_spi_config_t

sl_adc_config

sl_gpio_config_t

sl_sh_sdc_config_t

sl_bus_intf_config_t

Enumerations#

enum
SL_SH_POLLING_MODE
SL_SH_INTERRUPT_MODE
SL_SH_NO_MODE
}

Enumeration for Sensor HUB data reading mode.

enum
SL_SENSOR_CREATION_FAILED
SL_SENSOR_STARTED
SL_SENSOR_STOPPED
SL_SENSOR_DATA_READY
SL_SENSOR_CNFG_INVALID
SL_SENSOR_START_FAILED
SL_SENSOR_STOP_FAILED
SL_SENSOR_DELETED
SL_SENSOR_DELETE_FAILED
}

Enumeration for Sensors HUB Callback Events.

enum
SL_SH_RISE_EDGE
SL_SH_FALL_EDGE
SL_SH_LOW_LEVEL
SL_SH_HIGH_LEVEL
}

Enumeration for GPIO Interrupt Configurations.

enum
SL_SH_THRESHOLD
SL_SH_TIMEOUT
SL_SH_NUM_OF_SAMPLES
SL_SH_NO_DATA_MODE
}

Enumeration for Sensor HUB data delivery mode.

enum
SL_SENSOR_INVALID
SL_SENSOR_VALID
SL_SENSOR_START
SL_SENSOR_STOP
}

Enumeration for Sensors Status.

Typedefs#

typedef struct sl_adc_config

ADC bus interface configuration structure.

Variables#

bool

I2C bus error status.

bool

SPI bus error status.

bool

ADC bus error status.

bool
bool

All buses error status.

uint32_t

Threshold value for the sensor.

uint32_t

Threshold value for the sensor.

uint32_t

Timeout values for the sensor.

uint32_t

Timeout values for the sensor.

uint32_t

Number of samples for the sensor.

uint32_t

Number of samples for the sensor.

union sl_data_deliver_type_t::@0
char *

Name of the sensor.

int16_t

GPIO Interrupt Configurations.

uint16_t

GPIO pin for sampling the sensor data.

uint32_t

Sensor data sampling interval.

uint8_t

Address of sensor.

uint8_t

Address of sensor.

uint16_t

Channel for adc.

uint16_t

Channel for adc.

union sl_sensor_info_t::@2
sl_sensor_id_t

Sensor id.

sl_sensor_bus_t

Protocol for the sensor(spi/i2c)

Sensor Mode(Enumeration)

sl_sensor_range_t

Range of sensor.

Data delivery mode for the sensor.

sl_sensor_data_group_t *

Sensor data storage structure.

void *

Sensor handle.

void *

Sensor control handle.

uint8_t

Sensor event bits.

uint8_t

Sensor event acknowledge.

uint16_t

Maximum samples for the sensors.

Sensor configuration structure.

sl_sensor_impl_type_t *

Sensor implementation structure.

TimerHandle_t

RTOS timer handle.

uint8_t

Sensor index.

Sensor handle structure.

uint8_t

Interrupt mode sensor index.

uint16_t

Interrupt GPIO Pin.

uint16_t

Channel number for ADC interrupt.

uint16_t

Channel number for ADC interrupt.

uint8_t

Map Table Index.

Sensor list MAP Table.

void *

String the sensor data address.

sl_sensor_id_t

Sensor id information.

Sensors HUB Callback Events.

sl_sensor_signalEvent_t

Event callback.

sl_sensor_id_t *

Event callback acknowledge.

uint8_t

I2C instances(I2C0/1/2)

uint8_t

I2C power state.

uint8_t

I2C bus control configuration.

uint16_t

I2C bus speed.

uint32_t

I2C slave address.

uint8_t

SPI bus width.

uint8_t

SPI Mode(Master/Slave)

uint8_t

SPI bus power mode.

uint8_t

Chip select number.

uint8_t

SPI miscellaneous for chip select.

uint8_t

SPI slave select signal definitions.

uint32_t

SPI bus data transmission speed(clock)

uint64_t

SPI bus phase and polarity.

uint64_t

SPI control slave select mode.

uint8_t

flag to know if adc is initialized, this is necessary to deinit

uint16_t

flag to indicate data availability for all 16 channels

sl_adc_config_t

adc configuration

sl_adc_channel_config_t

adc channel configuration

uint8_t
uint32_t

I2C configuration structure.

SPI configuration structure.

ADC configuration structure.

GPIO configuration structure.

SDC configuration structure.

Functions#

sl_status_t

Initialization Peripherals of Sensor HUB.

sl_status_t
sl_si91x_sensorhub_detect_sensors(sl_sensor_id_t sensor_id_info[], uint8_t num_of_sensors)

Detect the sensors.

sl_status_t
sl_si91x_sensorhub_delete_sensor(sl_sensor_id_t sensor_id)

Delete the specific sensor from the Sensor HUB.

sl_status_t
sl_si91x_sensorhub_create_sensor(sl_sensor_id_t sensor_id)

Create a sensor instance in the sensor hub.

sl_status_t
sl_si91x_sensorhub_start_sensor(sl_sensor_id_t sensor_id)

Start the sensor operation for the given sensor.

sl_status_t
sl_si91x_sensorhub_stop_sensor(sl_sensor_id_t sensor_id)

Stop the sensor operation of the given sensor.

void
sl_si91x_em_post_event(sl_sensor_id_t sensor_id, sl_sensorhub_event_t event, void *dataPtr, TickType_t ticks_to_wait)

Post the events to event manager(EM) to be notified to the application.

void

Task to handle the sensor operations.

void

Task to handle the system power operations.

void

Task to handle the operations of the Event Manager(EM)

int32_t

Initialize the I2C Interface based on configuration.

int32_t

Initialize SPI Interface based on configuration.

int32_t
sli_si91x_i2c_sensors_scan(uint16_t address)

Scan the I2C sensors.

sl_sensor_impl_type_t *

to get sensor implementation.

int32_t

Create the sensor list index.

uint32_t
sli_si91x_get_sensor_index(sl_sensor_id_t sensor_id)

Get the sensor index for the sensor list.

uint32_t
sli_si91x_delete_sensor_list_index(sl_sensor_id_t sensor_id)

Delete the sensor index for the sensor list.

sli_si91x_get_sensor_info(sl_sensor_id_t sensor_id)

get the sensor info from the sensor configuration structure.

sl_status_t
sl_si91x_sensorhub_notify_cb_register(sl_sensor_signalEvent_t cb_event, sl_sensor_id_t *cb_ack)

Call back function to the application.

void
sl_si91x_sensors_timer_cb(TimerHandle_t xTimer)

Sensor OS timer callback function.

sl_status_t
sl_si91x_gpio_interrupt_config(uint16_t gpio_pin, sl_gpio_intr_type_t intr_type)

Configuring the different types of NPSS GPIO interrupts in the Sensor HUB.

void

Enable and set the priority of NPSS GPIO interrupt.

void
sl_si91x_gpio_interrupt_stop(uint16_t gpio_pin)

Mask and Disable the NPSS GPIO interrupt.

sl_status_t

Start the sensor hub Tasks.

void

set the alarm interrupt time.

void

initialize the Alarm block.

void
sli_si91x_config_wakeup_source(uint16_t sleep_time)

Configure the wake-up source for the system.

void
sli_si91x_sleep_wakeup(uint16_t sh_sleep_time)

Configures sleep/wakeup sources for the system.

void

Change the system status from PS4 to PS2.

void

Change the system status from PS2 to PS4.

sl_status_t

Initialize ADC Interface based on configuration.

void

Initialize and configure the systic timer for the RTOS.

void
ARM_I2C_SignalEvent(uint32_t event)

I2C event handler.

Fetch ADC bus interface information.

void
sl_si91x_adc_callback(uint8_t channel_no, uint8_t event)

ADC callback from RSI_ADC_InterruptHandler.

sl_status_t

Initialize the sdc Interface based on the configuration.

void
sli_config_sdc_params(sl_drv_sdc_config_t *sdc_config_st_p)

Macros#

#define

Sensor task stack size.

#define

EM task stack size.

#define

Power task stack size.

#define
SL_EM_TASK_RUN_TICKS osWaitForever

Max wait time of message queue in Event task.

#define

Size of the sensors interrupt MAP table.

#define
NPSS_GPIO_IRQHandler IRQ021_Handler

NPSS gpio IRQ handler.

#define
NPSS_GPIO_NVIC NPSS_TO_MCU_GPIO_INTR_IRQn

NPSS gpio IRQ Number 21.

#define

Periodic alarm configuration in milliseconds.

#define

RC clock trigger time.

#define

RO clock trigger time.

#define

Number of hours in a day.

#define

Number of minutes in an hour.

#define

Number of Seconds in a minute.

#define

Number of milliseconds in a second.

#define

Number of months in a year.

#define

Start year for alarm configuration.

#define

Month with 28 days.

#define

Month with 29 days.

#define

Month with 30 days.

#define

Month with 31 days.

#define
RTC_ALARM_IRQHandler IRQ028_Handler

Alarm IRQ handler.

#define
NVIC_RTC_ALARM MCU_CAL_ALARM_IRQn

Alarm IRQ number 28.

#define
SL_SH_TIMER_CREATION_FAILED (1 << SL_SH_SENSORHUB_ERRORS_MASK)

Creating OS timer for the sensor failed.

#define
SL_SH_TIMER_DELETION_FAILED (2 << SL_SH_SENSORHUB_ERRORS_MASK)

Deleting OS timer of the sensor failed.

#define
SL_SH_TIMER_START_FAIL (3 << SL_SH_SENSORHUB_ERRORS_MASK)

Starting OS timer of the sensor failed.

#define
SL_SH_TIMER_STOP_FAIL (4 << SL_SH_SENSORHUB_ERRORS_MASK)

Stopping OS timer of the sensor failed.

#define
SL_SH_MAX_SENSORS_REACHED (5 << SL_SH_SENSORHUB_ERRORS_MASK)

Max number of sensor limit reached.

#define
SL_SH_MEMORY_LIMIT_EXCEEDED (6 << SL_SH_SENSORHUB_ERRORS_MASK)

Memory allocation for sensor data storage failed.

#define
SL_SH_SENSOR_CREATE_FAIL (7 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor API is called for a sensor without creating it.

#define
SL_SH_COMMAND_SET_POWER_FAIL (8 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor set power command execution failed.

#define
SL_SH_COMMAND_SET_RANGE_FAIL (9 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor set range command execution failed.

#define
SL_SH_COMMAND_SELF_TEST_FAIL (10 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor self-test command execution failed.

#define
SL_SH_INVALID_PARAMETERS (11 << SL_SH_SENSORHUB_ERRORS_MASK)

Generic error code for any invalid parameters.

#define
SL_SH_GPIO_OUT_OF_RANGE (12 << SL_SH_SENSORHUB_ERRORS_MASK)

Invalid gpio number.

#define
SL_SH_SENSOR_IMPLEMENTATION_NOT_FOUND (13 << SL_SH_SENSORHUB_ERRORS_MASK)

No hal implementation found for given sensor type.

#define
SL_SH_INTERRUPT_TYPE_CONFIG_FAIL (14 << SL_SH_SENSORHUB_ERRORS_MASK)

Interrupt type configuration failed.

#define
SL_SH_MEMORY_ALLOCATION_FAILED (15 << SL_SH_SENSORHUB_ERRORS_MASK)

Allocating memory for sensor hal failed.

#define

Sensor not created.

#define
SL_SH_CONFIG_NOT_FOUND (16 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor configuration not found.

#define
SL_SH_INVALID_ADDRESS (17 << SL_SH_SENSORHUB_ERRORS_MASK)

No sensor found at given address.

#define
SL_SH_WRONG_INTERRUPT_TYPE (18 << SL_SH_SENSORHUB_ERRORS_MASK)

Invalid interrupt type is given for the sensor.

#define
SL_SH_INVALID_MODE (19 << SL_SH_SENSORHUB_ERRORS_MASK)

Invalid mode is given for the sensor.

#define
SL_SH_INVALID_DELIVERY_MODE (20 << SL_SH_SENSORHUB_ERRORS_MASK)

Invalid delivery mode is given for the sensor.

#define
SL_SH_HAL_SENSOR_CREATION_FAILED (21 << SL_SH_SENSORHUB_ERRORS_MASK)

Create sensor in HAL failed.

#define
SL_SH_HAL_SENSOR_DELETION_FAILED (22 << SL_SH_SENSORHUB_ERRORS_MASK)

Delete sensor in HAL failed.

#define
SL_SH_HAL_SENSOR_SAMPLE_FAIL (23 << SL_SH_SENSORHUB_ERRORS_MASK)

Sample sensor in HAL failed.

#define
SL_SH_HAL_SENSOR_CONTROL_FAIL (24 << SL_SH_SENSORHUB_ERRORS_MASK)

Control sensor in HAL failed.

#define
SL_SH_POWER_TASK_CREATION_FAILED (25 << SL_SH_SENSORHUB_ERRORS_MASK)

Power task creation failed.

#define
SL_SH_SENSOR_TASK_CREATION_FAILED (26 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor task creation failed.

#define
SL_SH_EM_TASK_CREATION_FAILED (27 << SL_SH_SENSORHUB_ERRORS_MASK)

EM task creation failed.

#define
SL_ALL_PERIPHERALS_INIT_FAILED (28 << SL_SH_SENSORHUB_ERRORS_MASK)

All(i2c,spi,adc) peripheral's initialization failed.

Enumeration Documentation#

sl_sensor_mode_t#

sl_sensor_mode_t

Enumeration for Sensor HUB data reading mode.

Enumerator
SL_SH_POLLING_MODE

POLLING_MODE.

SL_SH_INTERRUPT_MODE

INTERRUPT_MODE.

SL_SH_NO_MODE

Definition at line 101 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_sensorhub_event_t#

sl_sensorhub_event_t

Enumeration for Sensors HUB Callback Events.

Enumerator
SL_SENSOR_CREATION_FAILED
SL_SENSOR_STARTED
SL_SENSOR_STOPPED
SL_SENSOR_DATA_READY
SL_SENSOR_CNFG_INVALID
SL_SENSOR_START_FAILED
SL_SENSOR_STOP_FAILED
SL_SENSOR_DELETED
SL_SENSOR_DELETE_FAILED

Definition at line 108 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_gpio_intr_type_t#

sl_gpio_intr_type_t

Enumeration for GPIO Interrupt Configurations.

Enumerator
SL_SH_RISE_EDGE

Interrupt at GPIO rise edge.

SL_SH_FALL_EDGE

Interrupt at GPIO fall edge.

SL_SH_LOW_LEVEL

Interrupt at GPIO low level.

SL_SH_HIGH_LEVEL

Interrupt at GPIO high level.


Definition at line 121 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_data_deliver_mode_t#

sl_data_deliver_mode_t

Enumeration for Sensor HUB data delivery mode.

Enumerator
SL_SH_THRESHOLD

Threshold value for sensor data delivery.

SL_SH_TIMEOUT

Timeout value for sensor data delivery.

SL_SH_NUM_OF_SAMPLES

Number of samples for sensor data delivery.

SL_SH_NO_DATA_MODE

Definition at line 129 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_sensor_status_t#

sl_sensor_status_t

Enumeration for Sensors Status.

Enumerator
SL_SENSOR_INVALID

Sensor is Invalid.

SL_SENSOR_VALID

Sensor is Valid.

SL_SENSOR_START

Sensor is Started.

SL_SENSOR_STOP

Sensor is Stoped.


Definition at line 137 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

Typedef Documentation#

sl_adc_cfg_t#

typedef struct sl_adc_config sl_adc_cfg_t

ADC bus interface configuration structure.


Definition at line 274 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

Variable Documentation#

i2c#

bool sl_sensorhub_errors_t::i2c

I2C bus error status.


Definition at line 154 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi#

bool sl_sensorhub_errors_t::spi

SPI bus error status.


Definition at line 155 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

adc#

bool sl_sensorhub_errors_t::adc

ADC bus error status.


Definition at line 156 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sdc#

bool sl_sensorhub_errors_t::sdc

Definition at line 157 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_global_status#

bool sl_sensorhub_errors_t::sensor_global_status

All buses error status.


Definition at line 158 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

data_mode#

sl_data_deliver_mode_t sl_data_deliver_type_t::data_mode

Definition at line 164 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

threshold#

uint32_t sl_data_deliver_type_t::threshold

Threshold value for the sensor.


Definition at line 166 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

threshold#

uint32_t sl_data_deliver_type_t::@0::threshold

Threshold value for the sensor.


Definition at line 166 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

timeout#

uint32_t sl_data_deliver_type_t::timeout

Timeout values for the sensor.


Definition at line 167 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

timeout#

uint32_t sl_data_deliver_type_t::@0::timeout

Timeout values for the sensor.


Definition at line 167 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

numofsamples#

uint32_t sl_data_deliver_type_t::numofsamples

Number of samples for the sensor.


Definition at line 168 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

numofsamples#

uint32_t sl_data_deliver_type_t::@0::numofsamples

Number of samples for the sensor.


Definition at line 168 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

@1#

union sl_data_deliver_type_t::@0 sl_data_deliver_type_t::@1

Definition at line 169 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_name#

char* sl_sensor_info_t::sensor_name

Name of the sensor.


Definition at line 175 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_intr_type#

int16_t sl_sensor_info_t::sensor_intr_type

GPIO Interrupt Configurations.


Definition at line 176 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sampling_intr_req_pin#

uint16_t sl_sensor_info_t::sampling_intr_req_pin

GPIO pin for sampling the sensor data.


Definition at line 177 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sampling_interval#

uint32_t sl_sensor_info_t::sampling_interval

Sensor data sampling interval.


Definition at line 178 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

address#

uint8_t sl_sensor_info_t::address

Address of sensor.


Definition at line 180 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

address#

uint8_t sl_sensor_info_t::@2::address

Address of sensor.


Definition at line 180 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

channel#

uint16_t sl_sensor_info_t::channel

Channel for adc.


Definition at line 181 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

channel#

uint16_t sl_sensor_info_t::@2::channel

Channel for adc.


Definition at line 181 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

@3#

union sl_sensor_info_t::@2 sl_sensor_info_t::@3

Definition at line 182 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_id#

sl_sensor_id_t sl_sensor_info_t::sensor_id

Sensor id.


Definition at line 183 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_bus#

sl_sensor_bus_t sl_sensor_info_t::sensor_bus

Protocol for the sensor(spi/i2c)


Definition at line 184 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_mode#

sl_sensor_mode_t sl_sensor_info_t::sensor_mode

Sensor Mode(Enumeration)


Definition at line 185 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_range#

sl_sensor_range_t sl_sensor_info_t::sensor_range

Range of sensor.


Definition at line 186 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

data_deliver#

sl_data_deliver_type_t sl_sensor_info_t::data_deliver

Data delivery mode for the sensor.


Definition at line 187 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_data_ptr#

sl_sensor_data_group_t* sl_sensor_info_t::sensor_data_ptr

Sensor data storage structure.


Definition at line 188 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_handle#

void* sl_sensor_handle_t::sensor_handle

Sensor handle.


Definition at line 194 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

ctrl_handle#

void* sl_sensor_handle_t::ctrl_handle

Sensor control handle.


Definition at line 195 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_event_bit#

uint8_t sl_sensor_handle_t::sensor_event_bit

Sensor event bits.


Definition at line 196 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

event_ack#

uint8_t sl_sensor_handle_t::event_ack

Sensor event acknowledge.


Definition at line 197 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

max_samples#

uint16_t sl_sensor_handle_t::max_samples

Maximum samples for the sensors.


Definition at line 198 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

config_st#

sl_sensor_info_t* sl_sensor_handle_t::config_st

Sensor configuration structure.


Definition at line 199 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_impl#

sl_sensor_impl_type_t* sl_sensor_handle_t::sensor_impl

Sensor implementation structure.


Definition at line 200 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_status#

sl_sensor_status_t sl_sensor_handle_t::sensor_status

Sensor status.


Definition at line 201 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

timer_handle#

TimerHandle_t sl_sensor_handle_t::timer_handle

RTOS timer handle.


Definition at line 202 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_index#

uint8_t sl_sensor_list_t::sensor_index

Sensor index.


Definition at line 208 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_sensors_st#

sl_sensor_handle_t sl_sensor_list_t::sl_sensors_st[SL_MAX_NUM_SENSORS]

Sensor handle structure.


Definition at line 209 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_list_index#

uint8_t sl_intr_list_t::sensor_list_index

Interrupt mode sensor index.


Definition at line 215 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

intr#

uint16_t sl_intr_list_t::intr

Interrupt GPIO Pin.


Definition at line 216 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

adc_intr_channel#

uint16_t sl_intr_list_t::adc_intr_channel

Channel number for ADC interrupt.


Definition at line 217 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sdc_intr_channel#

uint16_t sl_intr_list_t::sdc_intr_channel

Channel number for ADC interrupt.


Definition at line 218 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

map_index#

uint8_t sl_intr_list_map_t::map_index

Map Table Index.


Definition at line 224 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

map_table#

sl_intr_list_t sl_intr_list_map_t::map_table[MAP_TABLE_SIZE]

Sensor list MAP Table.


Definition at line 225 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

em_sensor_data#

void* sl_em_event_t::em_sensor_data

String the sensor data address.


Definition at line 231 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sensor_id#

sl_sensor_id_t sl_em_event_t::sensor_id

Sensor id information.


Definition at line 232 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

event#

sl_sensorhub_event_t sl_em_event_t::event

Sensors HUB Callback Events.


Definition at line 233 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

cb_event#

sl_sensor_signalEvent_t sl_sensor_cb_info_t::cb_event

Event callback.


Definition at line 239 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

cb_event_ack#

sl_sensor_id_t* sl_sensor_cb_info_t::cb_event_ack

Event callback acknowledge.


Definition at line 240 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

i2c_id#

uint8_t sl_i2c_config_t::i2c_id

I2C instances(I2C0/1/2)


Definition at line 246 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

i2c_power_state#

uint8_t sl_i2c_config_t::i2c_power_state

I2C power state.


Definition at line 247 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

i2c_control_mode#

uint8_t sl_i2c_config_t::i2c_control_mode

I2C bus control configuration.


Definition at line 248 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

i2c_bus_speed#

uint16_t sl_i2c_config_t::i2c_bus_speed

I2C bus speed.


Definition at line 249 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

i2c_slave_addr#

uint32_t sl_i2c_config_t::i2c_slave_addr

I2C slave address.


Definition at line 250 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_bit_width#

uint8_t sl_spi_config_t::spi_bit_width

SPI bus width.


Definition at line 256 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_mode#

uint8_t sl_spi_config_t::spi_mode

SPI Mode(Master/Slave)


Definition at line 257 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_power_state#

uint8_t sl_spi_config_t::spi_power_state

SPI bus power mode.


Definition at line 258 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_cs_number#

uint8_t sl_spi_config_t::spi_cs_number

Chip select number.


Definition at line 259 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_cs_misc_mode#

uint8_t sl_spi_config_t::spi_cs_misc_mode

SPI miscellaneous for chip select.


Definition at line 260 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_sec_sel_sig#

uint8_t sl_spi_config_t::spi_sec_sel_sig

SPI slave select signal definitions.


Definition at line 261 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_baud#

uint32_t sl_spi_config_t::spi_baud

SPI bus data transmission speed(clock)


Definition at line 262 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_control_mode#

uint64_t sl_spi_config_t::spi_control_mode

SPI bus phase and polarity.


Definition at line 263 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_cs_mode#

uint64_t sl_spi_config_t::spi_cs_mode

SPI control slave select mode.


Definition at line 264 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

adc_init#

uint8_t sl_adc_config::adc_init

flag to know if adc is initialized, this is necessary to deinit


Definition at line 270 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

adc_data_ready#

uint16_t sl_adc_config::adc_data_ready

flag to indicate data availability for all 16 channels


Definition at line 271 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

adc_cfg#

sl_adc_config_t sl_adc_config::adc_cfg

adc configuration


Definition at line 272 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

adc_ch_cfg#

sl_adc_channel_config_t sl_adc_config::adc_ch_cfg

adc channel configuration


Definition at line 273 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

c#

uint8_t sl_gpio_config_t::c

Definition at line 279 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

d#

uint32_t sl_gpio_config_t::d

Definition at line 280 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_p_channel_sel#

uint8_t sl_sh_sdc_config_t::sh_sdc_p_channel_sel[4]

Definition at line 286 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_n_channel_sel#

uint8_t sl_sh_sdc_config_t::sh_sdc_n_channel_sel[4]

Definition at line 287 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_sample_ther#

uint8_t sl_sh_sdc_config_t::sh_sdc_sample_ther

Definition at line 288 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_no_channel_sel#

uint8_t sl_sh_sdc_config_t::sh_sdc_no_channel_sel

Definition at line 289 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_data_trigger_sel#

uint8_t sl_sh_sdc_config_t::sh_sdc_data_trigger_sel

Definition at line 290 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_sample_trigger_sel#

uint8_t sl_sh_sdc_config_t::sh_sdc_sample_trigger_sel

Definition at line 291 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_cnt_trig_evnt#

uint8_t sl_sh_sdc_config_t::sh_sdc_cnt_trig_evnt

Definition at line 292 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_auxadc_diff_mode_ch#

uint8_t sl_sh_sdc_config_t::sh_sdc_auxadc_diff_mode_ch[4]

Definition at line 293 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_auxadc_en#

uint8_t sl_sh_sdc_config_t::sh_sdc_auxadc_en

Definition at line 294 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_adc_config_en#

uint8_t sl_sh_sdc_config_t::sh_sdc_adc_config_en

Definition at line 295 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_clk_div#

uint8_t sl_sh_sdc_config_t::sh_sdc_clk_div

Definition at line 296 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_samp_en#

uint8_t sl_sh_sdc_config_t::sh_sdc_samp_en

Definition at line 297 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

i2c_config#

sl_i2c_config_t sl_bus_intf_config_t::i2c_config

I2C configuration structure.


Definition at line 303 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

spi_config#

sl_spi_config_t sl_bus_intf_config_t::spi_config

SPI configuration structure.


Definition at line 304 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

adc_config#

sl_adc_cfg_t sl_bus_intf_config_t::adc_config

ADC configuration structure.


Definition at line 305 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

gpio_config#

sl_gpio_config_t sl_bus_intf_config_t::gpio_config

GPIO configuration structure.


Definition at line 306 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sh_sdc_config#

sl_sh_sdc_config_t sl_bus_intf_config_t::sh_sdc_config

SDC configuration structure.


Definition at line 307 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

Function Documentation#

sl_si91x_sensorhub_init#

sl_status_t sl_si91x_sensorhub_init ( -, -)

Initialization Peripherals of Sensor HUB.

Parameters
[in]-

NULL

[out]-

Return the Sensor Hub bus Initialization status

This function will initialize the Peripherals, based on the user configuration. like - I2C/SPI/ADC

Returns

  • status 0 if successful, else error code as follow:

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

    • SL_STATUS_OK (0X000)- Success, Peripherals initialization done properly


Definition at line 330 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensorhub_detect_sensors#

sl_status_t sl_si91x_sensorhub_detect_sensors (sl_sensor_id_t sensor_id_info, uint8_t num_of_sensors, -)

Detect the sensors.

Parameters
[in]sensor_id_info

- Sensor IDs

[in]num_of_sensors

- Number of sensors given by user

[out]-

None

This function will detect the sensor, based on the user configuration. and it will store the scanned sensor ID in the structure.

Returns

  • if successful, Return number of sensors scanned else error code


Definition at line 347 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensorhub_delete_sensor#

sl_status_t sl_si91x_sensorhub_delete_sensor (sl_sensor_id_t sensor_id, -)

Delete the specific sensor from the Sensor HUB.

Parameters
[in]sensor_id

- Sensor ID

[out]-

Return the delete sensors status

This function will delete the specific sensor from the sensor list, modify the sensor status to invalid, and publish the events to the event task.

Returns

  • status 0 if successful, else error code as follow:

    • SL_STATUS_FAIL (0x0001) - Fail, Delete sensor failed

    • SL_STATUS_OK (0X000) - Success, Delete sensor Success


Definition at line 365 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensorhub_create_sensor#

sl_status_t sl_si91x_sensorhub_create_sensor (sl_sensor_id_t sensor_id, -)

Create a sensor instance in the sensor hub.

Parameters
[in]sensor_id

- Id of sensor

[out]-

Return the create sensors status

This function creates a sensor instance as per user configuration.It also allocates max sample memory for the configured sensor.

Returns

  • status 0 if successful, else error code as follow:

    • SL_STATUS_FAIL (0x0001)- Fail, Create sensor instance failed

    • SL_STATUS _OK (0X000) - Create sensor instanceSuccess ,


Definition at line 382 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensorhub_start_sensor#

sl_status_t sl_si91x_sensorhub_start_sensor (sl_sensor_id_t sensor_id, -)

Start the sensor operation for the given sensor.

Parameters
[in]sensor_id

- Id of sensor

[out]-

Return the Start sensors status

This function can be called after creating a sensor with given sensor ID It does following operations

  • Starts timer for sensor with polling mode.

  • Enable IRQ handle for sensor with interrupt mode.

Returns

  • status 0 if successful, else error code as follow:

    • SL_STATUS_FAIL (0x0001)- Fail, Sensor start failed

    • SL_STATUS _OK (0X000) - Success ,Sensor start done properly


Definition at line 402 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensorhub_stop_sensor#

sl_status_t sl_si91x_sensorhub_stop_sensor (sl_sensor_id_t sensor_id, -)

Stop the sensor operation of the given sensor.

Parameters
[in]sensor_id

- Id of sensor

[out]-

Return the Stop sensor status

This function does following operations

  • Stop the sensor operations of the given sensor.

  • Based on the sensor mode it will stop the Polling/interrupt mode operations and updates the sensor statutes.

  • Disable IRQ handles of the interrupt mode sensors.

Returns

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

    • SL_STATUS_FAIL (0x0001)- Fail, Sensor stop failed

  • SL_STATUS _OK (0X000) - Success ,Sensor stop done properly


Definition at line 422 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_em_post_event#

void sl_si91x_em_post_event (sl_sensor_id_t sensor_id, sl_sensorhub_event_t event, void * dataPtr, TickType_t ticks_to_wait, -)

Post the events to event manager(EM) to be notified to the application.

Parameters
[in]sensor_id

- id of the sensor

[in]event

- sensor hub events

[in]dataPtr

- sensor data pointer

[in]ticks_to_wait

- max time to wait for the post

[out]-

None

It waits for mutex till ticks_to_wait and updates event queue if mutex is acquired

Returns

  • - NULL


Definition at line 439 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensor_task#

void sl_si91x_sensor_task (void , -)

Task to handle the sensor operations.

Parameters
[in]

None

[out]-

None

Sensor Task does following operations

  • Create the OS event and mutex to perform the sensor operations.

  • Sample the Sensor data based on the event flags.

  • Check the events and post the sensor data to the em task based on the sensor data delivery mode.

Returns

  • - NULL


Definition at line 459 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_power_state_task#

void sl_si91x_power_state_task (void , -)

Task to handle the system power operations.

Parameters
[in]

None

[out]-

None

Power state task changes the system from one power save mode to another power save mode like(PS4 to PS2),(PS2toPS4),(Sleep_mode) using Binary semaphore

Returns

  • - NULL


Definition at line 473 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_em_task#

void sl_si91x_em_task (void , -)

Task to handle the operations of the Event Manager(EM)

Parameters
[in]

None

[out]-

None

Em task does following operaions

  • Create the osMessageQueue and mutex to perform the event operations.

  • Calls the callback event Returns

    • - NULL


Definition at line 488 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_i2c_init#

int32_t sli_si91x_i2c_init (void , -)

Initialize the I2C Interface based on configuration.

Parameters
[in]

None

[out]-

None

This function will configure/Initialize I2C Interface based on configuration.

Returns

  • I2C Initializtion status


Definition at line 502 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_spi_init#

int32_t sli_si91x_spi_init (void , -)

Initialize SPI Interface based on configuration.

Parameters
[in]

None

[out]-

None

This function will configure/Initialize SPI Interface based on configuration.

Returns

  • SPI Initializtion status.


Definition at line 516 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_i2c_sensors_scan#

int32_t sli_si91x_i2c_sensors_scan (uint16_t address, -)

Scan the I2C sensors.

Parameters
[in]address

- Address of sensor

[out]-

None

This function will scan the I2C sensors based on the sensor address.

Returns

  • status 0 if successful, else it will wait for the sensor response.


Definition at line 531 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_get_sensor_implementation#

sl_sensor_impl_type_t * sli_si91x_get_sensor_implementation (int32_t sensor_id, -)

to get sensor implementation.

Parameters
[in]sensor_id

- Id of sensor

[out]-

None

This function will get the sensor implementation of the sensor based on sensor ID.

Returns

  • if successful, returns the Sensor implementation structure else returns an error code.


Definition at line 546 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_create_sensor_list_index#

int32_t sli_si91x_create_sensor_list_index ( -, -)

Create the sensor list index.

Parameters
[in]-

None

[out]-

Returns the Sensor ID from the implementation struct

This function will Create the sensor list index based on the sensor status For the maximum sensors available in the sensor hub

Returns

  • returns the sensor index in sensor_list


Definition at line 561 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_get_sensor_index#

uint32_t sli_si91x_get_sensor_index (sl_sensor_id_t sensor_id, -)

Get the sensor index for the sensor list.

Parameters
[in]sensor_id

- Id of sensor

[out]-

None

This function will retrieve the sensor index from the sensor list based on the sensor status and sensor ID for the maximum number of sensors available in the sensor hub.

Returns


Definition at line 578 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_delete_sensor_list_index#

uint32_t sli_si91x_delete_sensor_list_index (sl_sensor_id_t sensor_id, -)

Delete the sensor index for the sensor list.

Parameters
[in]sensor_id

- Id of sensor

[out]-

None

This function will delete the sensor from the sensor list based on The sensor ID for the maximum number of sensors available in the sensor hub.

Returns


Definition at line 594 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_get_sensor_info#

sl_sensor_info_t * sli_si91x_get_sensor_info (sl_sensor_id_t sensor_id, -)

get the sensor info from the sensor configuration structure.

Parameters
[in]sensor_id

- Id of sensor

[out]-

None

This function will retrieve sensor data from the sensor configuration structure to update the sensor list configuration structure for the maximum number of sensors available in the sensor hub.

Returns

  • if successful, returns the sensor information. else returns NULL.


Definition at line 611 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensorhub_notify_cb_register#

sl_status_t sl_si91x_sensorhub_notify_cb_register (sl_sensor_signalEvent_t cb_event, sl_sensor_id_t * cb_ack, -)

Call back function to the application.

Parameters
[in]cb_event

- Pointer to the callback event

[in]cb_ack

- Pointer to callback acknowledge to the application

[out]-

None

This function will update the callback function event and acknowledgment.

Returns

  • - If successful returns SL_STATUS_OK else returns error code


Definition at line 626 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensors_timer_cb#

void sl_si91x_sensors_timer_cb (TimerHandle_t xTimer, -)

Sensor OS timer callback function.

Parameters
[in]xTimer

- Timer handle

[out]-

None

This function will set the event flag bits based on the sensor sampling intervals. In the polling mode call the timer call-back function.

Returns

  • - NULL


Definition at line 641 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_gpio_interrupt_config#

sl_status_t sl_si91x_gpio_interrupt_config (uint16_t gpio_pin, sl_gpio_intr_type_t intr_type, -)

Configuring the different types of NPSS GPIO interrupts in the Sensor HUB.

Parameters
[in]gpio_pin

- NPSS gpio pin number

[in]intr_type

NPSS gpio interrupt type

[out]-

None

This function configures the NPSS gpios and enables the interrupt mode for the gpios.

Returns

  • - If successful returns SL_STATUS_OK else returns error code


Definition at line 656 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_gpio_interrupt_start#

void sl_si91x_gpio_interrupt_start (uint16_t gpio_pin, -)

Enable and set the priority of NPSS GPIO interrupt.

Parameters
[in]gpio_pin

- NPSS gpio pin number

[out]-

None

This function configures and sets the priority of the NPSS GPIO interrupt. GPIO interrupt priority is (configMAX_SYSCALL_INTERRUPT_PRIORITY - 1)

Returns

  • - NULL


Definition at line 671 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_gpio_interrupt_stop#

void sl_si91x_gpio_interrupt_stop (uint16_t gpio_pin, -)

Mask and Disable the NPSS GPIO interrupt.

Parameters
[in]gpio_pin

- NPSS gpio pin number

[out]-

None

This function masks and disables the IRQ handler of the NPSS GPIO interrupt.

Returns

  • - NULL


Definition at line 685 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_sensor_hub_start#

sl_status_t sl_si91x_sensor_hub_start (void , -)

Start the sensor hub Tasks.

Parameters
[in]

None

[out]-

None

This Starts the sensor hub Tasks.

Returns

  • - If succesfull returns SL_STATUS_OK else returns error code


Definition at line 699 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_set_alarm_intr_time#

void sli_si91x_set_alarm_intr_time (uint16_t interval, -)

set the alarm interrupt time.

Parameters
[in]interval

- interval time

[out]-

None

This function will set the alarm interrupt based on the periodic time.

Returns

  • - NULL


Definition at line 713 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_init_m4alarm_config#

void sli_si91x_init_m4alarm_config (void , -)

initialize the Alarm block.

Parameters
[in]

None

[out]-

None

This function will initialize the Alarm block.

Returns

  • - NULL


Definition at line 727 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_config_wakeup_source#

void sli_si91x_config_wakeup_source (uint16_t sleep_time, -)

Configure the wake-up source for the system.

Parameters
[in]sleep_time

- Sleep time for the sensor hub

[out]-

None

This function will configure the wake-up source to the system.

Returns

  • - NULL


Definition at line 741 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_sleep_wakeup#

void sli_si91x_sleep_wakeup (uint16_t sh_sleep_time, -)

Configures sleep/wakeup sources for the system.

Parameters
[in]sh_sleep_time

- Sleep time for the sensor hub, in ADC PS-1 no parameters

[out]-

None

This function will configure sleep/wakeup sources.

Returns

  • - NULL


Definition at line 758 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_sensorhub_ps4tops2_state#

void sli_si91x_sensorhub_ps4tops2_state (void , -)

Change the system status from PS4 to PS2.

Parameters
[in]

None

[out]-

None

This function will change the system status from PS4 to PS2.

Returns

  • - NULL


Definition at line 772 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_sensorhub_ps2tops4_state#

void sli_si91x_sensorhub_ps2tops4_state (void , -)

Change the system status from PS2 to PS4.

Parameters
[in]

None

[out]-

None

This function will change the system status from PS2 to PS4.

Returns

  • - NULL


Definition at line 786 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_adc_init#

sl_status_t sli_si91x_adc_init (void )

Initialize ADC Interface based on configuration.

Parameters
[in]

None

This function will configure/Initialize ADC Interface based on configuration.

Returns

  • error code SL_STATUS_FAIL (0x0001)- Fail , SL_STATUS_OK (0X000)- Success


Definition at line 801 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

vPortSetupTimerInterrupt#

void vPortSetupTimerInterrupt (void , -)

Initialize and configure the systic timer for the RTOS.

Parameters
[in]

None

[out]-

None

Set up the systic timer to generate the tick interrupts at the required frequency.

Returns

  • Initialize status to the application.


Definition at line 815 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

ARM_I2C_SignalEvent#

void ARM_I2C_SignalEvent (uint32_t event, -)

I2C event handler.

Parameters
[in]event

- I2C transmit and receive events

[out]-

None

Returns

  • None


Definition at line 826 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_fetch_adc_bus_intf_info#

sl_adc_cfg_t * sl_si91x_fetch_adc_bus_intf_info (void )

Fetch ADC bus interface information.

Parameters
N/A

This can be used by lower level layers Returns

  • Pointer to ADC configuration structure


Definition at line 835 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_si91x_adc_callback#

void sl_si91x_adc_callback (uint8_t channel_no, uint8_t event)

ADC callback from RSI_ADC_InterruptHandler.

Parameters
[in]channel_no

- respective channel number

[in]event

- callback event (ADC_STATIC_MODE_CALLBACK, ADC_THRSHOLD_CALLBACK, INTERNAL_DMA, FIFO_MODE_EVENT)


Definition at line 847 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_si91x_sdc_init#

uint8_t sli_si91x_sdc_init (void )

Initialize the sdc Interface based on the configuration.

Parameters
[in]

Returns

  • status 0 if successful, else error code SL_STATUS_FAIL (0x0001)- Fail , SL_STATUS_OK (0X000)- Success,


Definition at line 860 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sli_config_sdc_params#

void sli_config_sdc_params (sl_drv_sdc_config_t * sdc_config_st_p)
Parameters
N/Asdc_config_st_p

Definition at line 871 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

Macro Definition Documentation#

SL_SH_SENSOR_TASK_STACK_SIZE#

#define SL_SH_SENSOR_TASK_STACK_SIZE
Value:
(512 * 2)

Sensor task stack size.


Definition at line 54 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

SL_SH_EM_TASK_STACK_SIZE#

#define SL_SH_EM_TASK_STACK_SIZE
Value:
(512 * 2)

EM task stack size.


Definition at line 55 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

SL_SH_POWER_SAVE_TASK_STACK_SIZE#

#define SL_SH_POWER_SAVE_TASK_STACK_SIZE
Value:
(512 * 2)

Power task stack size.


Definition at line 56 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

SL_EM_TASK_RUN_TICKS#

#define SL_EM_TASK_RUN_TICKS
Value:
osWaitForever

Max wait time of message queue in Event task.


Definition at line 57 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

MAP_TABLE_SIZE#

#define MAP_TABLE_SIZE
Value:
10

Size of the sensors interrupt MAP table.


Definition at line 58 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NPSS_GPIO_IRQHandler#

#define NPSS_GPIO_IRQHandler
Value:
IRQ021_Handler

NPSS gpio IRQ handler.


Definition at line 63 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NPSS_GPIO_NVIC#

#define NPSS_GPIO_NVIC
Value:
NPSS_TO_MCU_GPIO_INTR_IRQn

NPSS gpio IRQ Number 21.


Definition at line 64 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

SL_ALARM_PERIODIC_TIME#

#define SL_ALARM_PERIODIC_TIME
Value:
10

Periodic alarm configuration in milliseconds.


Definition at line 69 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

RC_TRIGGER_TIME#

#define RC_TRIGGER_TIME
Value:
5

RC clock trigger time.


Definition at line 70 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

RO_TRIGGER_TIME#

#define RO_TRIGGER_TIME
Value:
0

RO clock trigger time.


Definition at line 71 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_HOURS_IN_A_DAY#

#define NO_OF_HOURS_IN_A_DAY
Value:
24

Number of hours in a day.


Definition at line 72 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_MINUTES_IN_AN_HOUR#

#define NO_OF_MINUTES_IN_AN_HOUR
Value:
60

Number of minutes in an hour.


Definition at line 73 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_SECONDS_IN_A_MINUTE#

#define NO_OF_SECONDS_IN_A_MINUTE
Value:
60

Number of Seconds in a minute.


Definition at line 74 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_MILLISECONDS_IN_A_SECOND#

#define NO_OF_MILLISECONDS_IN_A_SECOND
Value:
1000

Number of milliseconds in a second.


Definition at line 75 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_MONTHS_IN_A_YEAR#

#define NO_OF_MONTHS_IN_A_YEAR
Value:
12

Number of months in a year.


Definition at line 76 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

BASE_YEAR#

#define BASE_YEAR
Value:
2000

Start year for alarm configuration.


Definition at line 77 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_DAYS_IN_A_MONTH_1#

#define NO_OF_DAYS_IN_A_MONTH_1
Value:
28

Month with 28 days.


Definition at line 78 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_DAYS_IN_A_MONTH_2#

#define NO_OF_DAYS_IN_A_MONTH_2
Value:
29

Month with 29 days.


Definition at line 79 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_DAYS_IN_A_MONTH_3#

#define NO_OF_DAYS_IN_A_MONTH_3
Value:
30

Month with 30 days.


Definition at line 80 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NO_OF_DAYS_IN_A_MONTH_4#

#define NO_OF_DAYS_IN_A_MONTH_4
Value:
31

Month with 31 days.


Definition at line 81 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

RTC_ALARM_IRQHandler#

#define RTC_ALARM_IRQHandler
Value:
IRQ028_Handler

Alarm IRQ handler.


Definition at line 86 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

NVIC_RTC_ALARM#

#define NVIC_RTC_ALARM
Value:
MCU_CAL_ALARM_IRQn

Alarm IRQ number 28.


Definition at line 87 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

SL_SH_SENSORHUB_ERRORS_MASK#

#define SL_SH_SENSORHUB_ERRORS_MASK
Value:
0

Definition at line 46 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_TIMER_CREATION_FAILED#

#define SL_SH_TIMER_CREATION_FAILED
Value:
(1 << SL_SH_SENSORHUB_ERRORS_MASK)

Creating OS timer for the sensor failed.


Definition at line 50 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_TIMER_DELETION_FAILED#

#define SL_SH_TIMER_DELETION_FAILED
Value:
(2 << SL_SH_SENSORHUB_ERRORS_MASK)

Deleting OS timer of the sensor failed.


Definition at line 51 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_TIMER_START_FAIL#

#define SL_SH_TIMER_START_FAIL
Value:
(3 << SL_SH_SENSORHUB_ERRORS_MASK)

Starting OS timer of the sensor failed.


Definition at line 52 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_TIMER_STOP_FAIL#

#define SL_SH_TIMER_STOP_FAIL
Value:
(4 << SL_SH_SENSORHUB_ERRORS_MASK)

Stopping OS timer of the sensor failed.


Definition at line 53 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_MAX_SENSORS_REACHED#

#define SL_SH_MAX_SENSORS_REACHED
Value:
(5 << SL_SH_SENSORHUB_ERRORS_MASK)

Max number of sensor limit reached.


Definition at line 57 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_MEMORY_LIMIT_EXCEEDED#

#define SL_SH_MEMORY_LIMIT_EXCEEDED
Value:
  (6 << SL_SH_SENSORHUB_ERRORS_MASK)

Memory allocation for sensor data storage failed.


Definition at line 58 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_SENSOR_CREATE_FAIL#

#define SL_SH_SENSOR_CREATE_FAIL
Value:
  (7 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor API is called for a sensor without creating it.


Definition at line 60 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_COMMAND_SET_POWER_FAIL#

#define SL_SH_COMMAND_SET_POWER_FAIL
Value:
(8 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor set power command execution failed.


Definition at line 62 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_COMMAND_SET_RANGE_FAIL#

#define SL_SH_COMMAND_SET_RANGE_FAIL
Value:
(9 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor set range command execution failed.


Definition at line 63 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_COMMAND_SELF_TEST_FAIL#

#define SL_SH_COMMAND_SELF_TEST_FAIL
Value:
(10 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor self-test command execution failed.


Definition at line 64 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_INVALID_PARAMETERS#

#define SL_SH_INVALID_PARAMETERS
Value:
(11 << SL_SH_SENSORHUB_ERRORS_MASK)

Generic error code for any invalid parameters.


Definition at line 65 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_GPIO_OUT_OF_RANGE#

#define SL_SH_GPIO_OUT_OF_RANGE
Value:
(12 << SL_SH_SENSORHUB_ERRORS_MASK)

Invalid gpio number.


Definition at line 66 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_SENSOR_IMPLEMENTATION_NOT_FOUND#

#define SL_SH_SENSOR_IMPLEMENTATION_NOT_FOUND
Value:
  (13 << SL_SH_SENSORHUB_ERRORS_MASK)

No hal implementation found for given sensor type.


Definition at line 67 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_INTERRUPT_TYPE_CONFIG_FAIL#

#define SL_SH_INTERRUPT_TYPE_CONFIG_FAIL
Value:
(14 << SL_SH_SENSORHUB_ERRORS_MASK)

Interrupt type configuration failed.


Definition at line 69 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_MEMORY_ALLOCATION_FAILED#

#define SL_SH_MEMORY_ALLOCATION_FAILED
Value:
(15 << SL_SH_SENSORHUB_ERRORS_MASK)

Allocating memory for sensor hal failed.


Definition at line 70 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_SENSOR_INDEX_NOT_FOUND#

#define SL_SH_SENSOR_INDEX_NOT_FOUND
Value:
(0xFF)

Sensor not created.


Definition at line 71 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_CONFIG_NOT_FOUND#

#define SL_SH_CONFIG_NOT_FOUND
Value:
(16 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor configuration not found.


Definition at line 75 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_INVALID_ADDRESS#

#define SL_SH_INVALID_ADDRESS
Value:
(17 << SL_SH_SENSORHUB_ERRORS_MASK)

No sensor found at given address.


Definition at line 76 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_WRONG_INTERRUPT_TYPE#

#define SL_SH_WRONG_INTERRUPT_TYPE
Value:
  (18 << SL_SH_SENSORHUB_ERRORS_MASK)

Invalid interrupt type is given for the sensor.


Definition at line 77 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_INVALID_MODE#

#define SL_SH_INVALID_MODE
Value:
(19 << SL_SH_SENSORHUB_ERRORS_MASK)

Invalid mode is given for the sensor.


Definition at line 79 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_INVALID_DELIVERY_MODE#

#define SL_SH_INVALID_DELIVERY_MODE
Value:
  (20 << SL_SH_SENSORHUB_ERRORS_MASK)

Invalid delivery mode is given for the sensor.


Definition at line 80 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_HAL_SENSOR_CREATION_FAILED#

#define SL_SH_HAL_SENSOR_CREATION_FAILED
Value:
(21 << SL_SH_SENSORHUB_ERRORS_MASK)

Create sensor in HAL failed.


Definition at line 85 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_HAL_SENSOR_DELETION_FAILED#

#define SL_SH_HAL_SENSOR_DELETION_FAILED
Value:
(22 << SL_SH_SENSORHUB_ERRORS_MASK)

Delete sensor in HAL failed.


Definition at line 86 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_HAL_SENSOR_SAMPLE_FAIL#

#define SL_SH_HAL_SENSOR_SAMPLE_FAIL
Value:
(23 << SL_SH_SENSORHUB_ERRORS_MASK)

Sample sensor in HAL failed.


Definition at line 87 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_HAL_SENSOR_CONTROL_FAIL#

#define SL_SH_HAL_SENSOR_CONTROL_FAIL
Value:
(24 << SL_SH_SENSORHUB_ERRORS_MASK)

Control sensor in HAL failed.


Definition at line 88 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_POWER_TASK_CREATION_FAILED#

#define SL_SH_POWER_TASK_CREATION_FAILED
Value:
(25 << SL_SH_SENSORHUB_ERRORS_MASK)

Power task creation failed.


Definition at line 92 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_SENSOR_TASK_CREATION_FAILED#

#define SL_SH_SENSOR_TASK_CREATION_FAILED
Value:
(26 << SL_SH_SENSORHUB_ERRORS_MASK)

Sensor task creation failed.


Definition at line 93 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_SH_EM_TASK_CREATION_FAILED#

#define SL_SH_EM_TASK_CREATION_FAILED
Value:
(27 << SL_SH_SENSORHUB_ERRORS_MASK)

EM task creation failed.


Definition at line 94 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h

SL_ALL_PERIPHERALS_INIT_FAILED#

#define SL_ALL_PERIPHERALS_INIT_FAILED
Value:
  (28 << SL_SH_SENSORHUB_ERRORS_MASK)

All(i2c,spi,adc) peripheral's initialization failed.


Definition at line 95 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensorhub_error_codes.h