Low voltage digital temperature sensor
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3 X_NUCLEO_IKS01A3
This file provides a set of functions needed to drive the stts751 enhanced inertial module. More...
Modules | |
STTS751_Interfaces_Functions | |
This section provide a set of functions used to read and write a generic register of the device. | |
STTS751_Sensitivity | |
These functions convert raw-data into engineering units and vice-versa . | |
STTS751_Sensitivity_Reverse | |
This conversion is useful but not need by the driver. | |
STTS751_Data_Generation | |
This section groups all the functions concerning data generation. | |
STTS751_Data_Output | |
This section groups all the data output functions. | |
STTS751_Interrupt_Pins | |
This section groups all the functions that manage event pin. | |
STTS751_Interrupt_on_threshold | |
This section groups all the functions that manage interrupt on threshold event. | |
STTS751_Common | |
This section groups common useful functions. | |
STTS751_sensors_common_types | |
STTS751_Infos | |
STTS751_Register_Union | |
This union group all the registers that has a bitfield description. | |
Functions | |
int32_t | stts751_ota_thermal_limit_set (stts751_ctx_t *ctx, int8_t val) |
Thermal Limit. | |
int32_t | stts751_ota_thermal_limit_get (stts751_ctx_t *ctx, int8_t *val) |
Thermal Limit. | |
int32_t | stts751_ota_thermal_hyst_set (stts751_ctx_t *ctx, int8_t val) |
Thermal hysteresis. | |
int32_t | stts751_ota_thermal_hyst_get (stts751_ctx_t *ctx, int8_t *val) |
Thermal hysteresis. | |
int32_t | stts751_read_reg (stts751_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len) |
Read generic device register. | |
int32_t | stts751_write_reg (stts751_ctx_t *ctx, uint8_t reg, uint8_t *data, uint16_t len) |
Write generic device register. | |
int32_t | stts751_temp_data_rate_set (stts751_ctx_t *ctx, stts751_odr_t val) |
Temperature sensor data rate selection. | |
int32_t | stts751_temp_data_rate_get (stts751_ctx_t *ctx, stts751_odr_t *val) |
Temperature sensor data rate selection. | |
int32_t | stts751_resolution_set (stts751_ctx_t *ctx, stts751_tres_t val) |
Temperature sensor resolution selection. | |
int32_t | stts751_resolution_get (stts751_ctx_t *ctx, stts751_tres_t *val) |
Temperature sensor resolution selection. | |
int32_t | stts751_status_reg_get (stts751_ctx_t *ctx, stts751_status_t *val) |
The STATUS_REG register of the device. | |
int32_t | stts751_flag_busy_get (stts751_ctx_t *ctx, uint8_t *val) |
Temperature sensor "conversion on-going" flag. | |
int32_t | stts751_temperature_raw_get (stts751_ctx_t *ctx, int16_t *buff) |
Temperature data output register (r). | |
int32_t | stts751_pin_event_route_set (stts751_ctx_t *ctx, uint8_t val) |
Route interrupt signal threshold on event pad. | |
int32_t | stts751_pin_event_route_get (stts751_ctx_t *ctx, uint8_t *val) |
Route interrupt signal threshold on event pad. | |
int32_t | stts751_high_temperature_threshold_set (stts751_ctx_t *ctx, int16_t buff) |
high temperature theshold. | |
int32_t | stts751_high_temperature_threshold_get (stts751_ctx_t *ctx, int16_t *buff) |
high temperature theshold. | |
int32_t | stts751_low_temperature_threshold_set (stts751_ctx_t *ctx, int16_t buff) |
low temperature theshold. | |
int32_t | stts751_low_temperature_threshold_get (stts751_ctx_t *ctx, int16_t *buff) |
low temperature theshold. | |
int32_t | stts751_smbus_timeout_set (stts751_ctx_t *ctx, uint8_t val) |
SMBus timeout.At power-up, the STTS751 is configured with an SMBus timeout of 25 to 35 milliseconds. | |
int32_t | stts751_smbus_timeout_get (stts751_ctx_t *ctx, uint8_t *val) |
SMBus timeout.At power-up, the STTS751 is configured with an SMBus timeout of 25 to 35 milliseconds. | |
int32_t | stts751_device_id_get (stts751_ctx_t *ctx, stts751_id_t *buff) |
Device Who am I. |
Detailed Description
This file provides a set of functions needed to drive the stts751 enhanced inertial module.
This section groups all the functions that manage over temperature alarm functionality.
Function Documentation
int32_t stts751_device_id_get | ( | stts751_ctx_t * | ctx, |
stts751_id_t * | buff | ||
) |
Device Who am I.
[get]
- Parameters:
-
ctx read / write interface definitions buff buffer that stores data read
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 687 of file stts751_reg.c.
int32_t stts751_flag_busy_get | ( | stts751_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Temperature sensor "conversion on-going" flag.
[get]
- Parameters:
-
ctx read / write interface definitions val get the values of busy in reg STATUS
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 325 of file stts751_reg.c.
int32_t stts751_high_temperature_threshold_get | ( | stts751_ctx_t * | ctx, |
int16_t * | buff | ||
) |
high temperature theshold.
[get]
- Parameters:
-
ctx read / write interface definitions buff buffer that stores data read
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 473 of file stts751_reg.c.
int32_t stts751_high_temperature_threshold_set | ( | stts751_ctx_t * | ctx, |
int16_t | buff | ||
) |
high temperature theshold.
[set]
- Parameters:
-
ctx read / write interface definitions buff buffer that contains data to write
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 446 of file stts751_reg.c.
int32_t stts751_low_temperature_threshold_get | ( | stts751_ctx_t * | ctx, |
int16_t * | buff | ||
) |
low temperature theshold.
[get]
- Parameters:
-
ctx read / write interface definitions buff buffer that stores data read
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 528 of file stts751_reg.c.
int32_t stts751_low_temperature_threshold_set | ( | stts751_ctx_t * | ctx, |
int16_t | buff | ||
) |
low temperature theshold.
[set]
- Parameters:
-
ctx read / write interface definitions buff buffer that contains data to write
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 500 of file stts751_reg.c.
int32_t stts751_ota_thermal_hyst_get | ( | stts751_ctx_t * | ctx, |
int8_t * | val | ||
) |
Thermal hysteresis.
1 LSB = 1 degC.[get] max 127 degC min -127 degC.
- Parameters:
-
ctx read / write interface definitions val get the values of reg THERM_HYSTERESIS
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 619 of file stts751_reg.c.
int32_t stts751_ota_thermal_hyst_set | ( | stts751_ctx_t * | ctx, |
int8_t | val | ||
) |
Thermal hysteresis.
1 LSB = 1 degC.[set] max 127 degC min -127 degC.
- Parameters:
-
ctx read / write interface definitions val change the values of reg THERM_HYSTERESIS
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 602 of file stts751_reg.c.
int32_t stts751_ota_thermal_limit_get | ( | stts751_ctx_t * | ctx, |
int8_t * | val | ||
) |
Thermal Limit.
1 LSB = 1 degC (max 127 degC min -127 degC ).[get]
- Parameters:
-
ctx read / write interface definitions val get the values of reg THERM_LIMIT
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 585 of file stts751_reg.c.
int32_t stts751_ota_thermal_limit_set | ( | stts751_ctx_t * | ctx, |
int8_t | val | ||
) |
Thermal Limit.
1 LSB = 1 degC (max 127 degC min -127 degC ).[set]
- Parameters:
-
ctx read / write interface definitions val change the values of reg THERM_LIMIT
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 570 of file stts751_reg.c.
int32_t stts751_pin_event_route_get | ( | stts751_ctx_t * | ctx, |
uint8_t * | val | ||
) |
Route interrupt signal threshold on event pad.
[get]
- Parameters:
-
ctx read / write interface definitions val get mask1 bit in register CONFIGURATION.
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 416 of file stts751_reg.c.
int32_t stts751_pin_event_route_set | ( | stts751_ctx_t * | ctx, |
uint8_t | val | ||
) |
Route interrupt signal threshold on event pad.
[set]
- Parameters:
-
ctx read / write interface definitions val set mask1 bit in register CONFIGURATION.
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 395 of file stts751_reg.c.
int32_t stts751_read_reg | ( | stts751_ctx_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data, | ||
uint16_t | len | ||
) |
Read generic device register.
- Parameters:
-
ctx read / write interface definitions(ptr) reg register to read data pointer to buffer that store the data read(ptr) len number of consecutive register to read
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 66 of file stts751_reg.c.
int32_t stts751_resolution_get | ( | stts751_ctx_t * | ctx, |
stts751_tres_t * | val | ||
) |
Temperature sensor resolution selection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the values of tres in reg CONFIGURATION
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 275 of file stts751_reg.c.
int32_t stts751_resolution_set | ( | stts751_ctx_t * | ctx, |
stts751_tres_t | val | ||
) |
Temperature sensor resolution selection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the values of tres in reg CONFIGURATION
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 254 of file stts751_reg.c.
int32_t stts751_smbus_timeout_get | ( | stts751_ctx_t * | ctx, |
uint8_t * | val | ||
) |
SMBus timeout.At power-up, the STTS751 is configured with an SMBus timeout of 25 to 35 milliseconds.
[get]
- Parameters:
-
ctx read / write interface definitions val get timeout bit in register SMBUS_TIMEOUT.
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 670 of file stts751_reg.c.
int32_t stts751_smbus_timeout_set | ( | stts751_ctx_t * | ctx, |
uint8_t | val | ||
) |
SMBus timeout.At power-up, the STTS751 is configured with an SMBus timeout of 25 to 35 milliseconds.
[set]
- Parameters:
-
ctx read / write interface definitions val set timeout bit in register SMBUS_TIMEOUT.
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 648 of file stts751_reg.c.
int32_t stts751_status_reg_get | ( | stts751_ctx_t * | ctx, |
stts751_status_t * | val | ||
) |
The STATUS_REG register of the device.
[get]
- Parameters:
-
ctx read / write interface definitions val union of registers from STATUS to
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 310 of file stts751_reg.c.
int32_t stts751_temp_data_rate_get | ( | stts751_ctx_t * | ctx, |
stts751_odr_t * | val | ||
) |
Temperature sensor data rate selection.
[get]
- Parameters:
-
ctx read / write interface definitions val Get the sensor data rate
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 190 of file stts751_reg.c.
int32_t stts751_temp_data_rate_set | ( | stts751_ctx_t * | ctx, |
stts751_odr_t | val | ||
) |
Temperature sensor data rate selection.
[set]
- Parameters:
-
ctx read / write interface definitions val change the sensor data rate
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 153 of file stts751_reg.c.
int32_t stts751_temperature_raw_get | ( | stts751_ctx_t * | ctx, |
int16_t * | buff | ||
) |
Temperature data output register (r).
L and H registers together express a 16-bit word in two’s complement.[get]
- Parameters:
-
ctx read / write interface definitions buff buffer that stores data read
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 357 of file stts751_reg.c.
int32_t stts751_write_reg | ( | stts751_ctx_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data, | ||
uint16_t | len | ||
) |
Write generic device register.
- Parameters:
-
ctx read / write interface definitions(ptr) reg register to write data pointer to data to write in register reg(ptr) len number of consecutive register to write
- Return values:
-
interface status (MANDATORY: return 0 -> no Error)
Definition at line 84 of file stts751_reg.c.
Generated on Fri Jul 15 2022 18:33:31 by 1.7.2