Sensor Hub#

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_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
}
enum
SL_SH_RISE_EDGE
SL_SH_FALL_EDGE
SL_SH_LOW_LEVEL
SL_SH_HIGH_LEVEL
}
enum
SL_SH_THRESHOLD
SL_SH_TIMEOUT
SL_SH_NUM_OF_SAMPLES
SL_SH_NO_DATA_MODE
}
enum
SL_SENSOR_INVALID
SL_SENSOR_VALID
SL_SENSOR_START
SL_SENSOR_STOP
}
enum
SL_SI91X_POWER_MANAGER_PS0 = 0
SL_SI91X_POWER_MANAGER_PS1
SL_SI91X_POWER_MANAGER_PS2
SL_SI91X_POWER_MANAGER_PS3
SL_SI91X_POWER_MANAGER_PS4
SL_SI91X_POWER_MANAGER_SLEEP
SL_SI91X_POWER_MANAGER_STANDBY
LAST_ENUM_POWER_STATE
SL_SH_PS4TOPS2
SL_SH_PS2TOPS4
SL_SH_SLEEP_WAKEUP
SL_SH_DUMMY
}

Typedefs#

typedef void(*
sl_sensor_signalEvent_t)(uint8_t sensor_id, uint8_t event, void *data)

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 for 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.

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.

Macros#

#define

Sensor task stack size.

#define

EM task stack size.

#define

Power task stack size.

#define
SL_EM_TASK_RUN_TICKS osWaitForever

Event task Messageque maximum waiting time.

#define

Size of the 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.

#define

Periodic alarm configuration in milliseconds.

#define

RC clock trigger time.

#define

RO clock trigger time.

#define

Number of hours.

#define

Number of minutes.

#define

Number of Seconds.

#define

Number of milliseconds.

#define

Number of months.

#define

Start year for alarm configuration.

#define

Number of days in month.

#define

Number of days in month.

#define

Number of days in month.

#define

Number of days in month.

#define
RTC_ALARM_IRQHandler IRQ028_Handler

Alarm IRQ handler.

#define
NVIC_RTC_ALARM MCU_CAL_ALARM_IRQn

Alarm IRQ number.

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 99 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_sensorhub_event_t#

sl_sensorhub_event_t
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
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 123 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_data_deliver_mode_t#

sl_data_deliver_mode_t
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 133 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_sensor_status_t#

sl_sensor_status_t
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 143 of file components/device/silabs/si91x/mcu/drivers/service/sensorhub/inc/sensor_hub.h

sl_power_state_t#

sl_power_state_t
Enumerator
SL_SI91X_POWER_MANAGER_PS0

PS0 Power State.

SL_SI91X_POWER_MANAGER_PS1

PS1 Power State.

SL_SI91X_POWER_MANAGER_PS2

PS2 Power State.

SL_SI91X_POWER_MANAGER_PS3

PS3 Power State.

SL_SI91X_POWER_MANAGER_PS4

PS4 Power State.

SL_SI91X_POWER_MANAGER_SLEEP

Sleep.

SL_SI91X_POWER_MANAGER_STANDBY

Standby.

LAST_ENUM_POWER_STATE

Last enum for validation.

SL_SH_PS4TOPS2
SL_SH_PS2TOPS4
SL_SH_SLEEP_WAKEUP
SL_SH_DUMMY

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

Typedef Documentation#

sl_sensor_signalEvent_t#

typedef void(* sl_sensor_signalEvent_t) (uint8_t sensor_id, uint8_t event, void *data) )(uint8_t sensor_id, uint8_t event, void *data)

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

sl_adc_cfg_t#

typedef struct sl_adc_config sl_adc_cfg_t

Definition at line 292 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 332 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]-

Return the status of the Detect sensor

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 is scanned else error code SL_STATUS_FAIL (0x0001)- Fail,


Definition at line 350 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 368 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 will create the sensor instances in the sensor HUB. Checking the sensor state and creating the sensor list index. Allocate max sample memory for the specific sensor. Creating the RTOS timer instance for the sensor sampling interval.

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 388 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 will start the sensor operation for the given sensor. Based on the sensor mode it will start the Polling/interrupt mode operations. It will Start the RTOS timer in Polling mode for the sensor. It will enable IRQ handles for the interrupt mode operations. it will post the status events to the em task. It will send the Control commands to the sensor to perform the operations.

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 410 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 for the given sensor.

Parameters
[in]sensor_id

- Id of sensor

[out]-

Return the Stop sensor status

This function will stop the sensor operation for the given sensor. Based on the sensor mode it will stop the Polling/interrupt mode operations and updates the sensor statutes. It will Stop the RTOS timer in Polling mode for the sensor. It will disable IRQ handles for the interrupt mode operations. it will post the status events to the em task. It will send the Control commands to the sensor to perform the operations.

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 433 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

This function will update the event queue based on the sensor event. It will acquire the events task mutex and update the events in the messageque and release the mutex.

Returns

  • - NULL


Definition at line 452 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

This function will handle the sensor operations. It will create the OS event and mutex to perform the sensor operations. It will sample the Sensor data based on the event flags. It will check the events and post the sensor data to the em task based on the sensor data delivery mode.

Returns

  • - NULL


Definition at line 473 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

This function will handle the system power operations. It will change the system from one power save mode to another power save made like(PS4 to PS2),(PS2toPS4),(SLeep_mode). It will use the Binary semaphore for changing the power states.

Returns

  • - NULL


Definition at line 490 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

This function will handle the Event Manager(EM) operations. It will create the osMessageQueue and mutex to perform the event operations. It will check the events in the osMessageQueue and send the sensor data to the application. It will check the acknowledgment from the application. Returns

  • - NULL


Definition at line 507 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]-

Return the I2C init status

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

Returns

  • Initialize status to the application


Definition at line 521 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]-

Return the SPI init status

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

Returns

  • Initialize status to the application.


Definition at line 535 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]-

Return the I2C sensors scan status

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 550 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]-

Return the Sensor ID from the implementation structure

This function will used to perform the sensor operation by using the sensor implementation structure.

Returns

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


Definition at line 565 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.

Parameters
[in]-

None

[out]-

Return 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

  • if successful, returns the sensor index else it will break the sensor list.


Definition at line 581 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]-

Return the Sensor Index from the list

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

  • if successful, returns the sensor index else it returns the 0XFF as a sensor index fail.


Definition at line 598 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]-

Return the deleted Sensor Index from the list

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

  • if successful, returns the sensor index else it returns the 0XFF as a sensor index fail.


Definition at line 614 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]-

Return the Match Sensor-id Index from the list

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 it returns the NULL as a sensor ID not found.


Definition at line 631 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,If fail returns error code


Definition at line 646 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 661 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,If fail returns error code


Definition at line 676 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 691 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 the NPSS GPIO interrupt.

Returns

  • - NULL


Definition at line 705 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,If fail returns error code


Definition at line 719 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 733 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 747 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 761 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

[out]-

None

This function will configure sleep/wakeup sources.

Returns

  • - NULL


Definition at line 778 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 792 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 806 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 821 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 835 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

- event I2C transmit and receive events

[out]-

None

Returns

  • None


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

sl_si91x_fetch_adc_bus_intf_info#

uint8_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 856 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 868 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

Event task Messageque maximum waiting time.


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 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.


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.


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.


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.


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.


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.


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

Number of days in month.


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

Number of days in month.


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

Number of days in month.


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

Number of days in month.


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.


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