SHT40AD1B Part Drivers API Documentation - Core ¶
This page documents the API of the Core component of the SHT40AD1B Part Drivers.
An overview of the driver is also available here: main_doc .
Functions ¶
Functions
-
sht40ad1b_drv_status_t
sht40ad1b_drv_init
(
sht40ad1b_object_t
*
p_obj
,
uint32_t
id
)
¶
-
initialize the SHT40AD1B sensor.
- Parameters :
-
p_obj – the device instance object
id – the device instance id
- Return values :
-
SHT40AD1B_OK – in case of success, SHT40AD1B_ERROR otherwise
-
sht40ad1b_drv_status_t
sht40ad1b_drv_get_humidity
(
sht40ad1b_object_t
*
p_obj
,
float_t
*
p_value
)
¶
-
get the SHT40AD1B humidity value.
- Parameters :
-
p_obj – the device instance object
p_value – pointer where the humidity value is written
- Return values :
-
SHT40AD1B_OK – in case of success, SHT40AD1B_ERROR otherwise
-
sht40ad1b_drv_status_t
sht40ad1b_drv_get_temperature
(
sht40ad1b_object_t
*
p_obj
,
float_t
*
p_value
)
¶
-
get the SHT40AD1B temperature value.
- Parameters :
-
p_obj – the device instance object
p_value – pointer where the temperature value is written
- Return values :
-
SHT40AD1B_OK – in case of success, SHT40AD1B_ERROR otherwise
-
sht40ad1b_drv_status_t
sht40ad1b_serial_get
(
sht40ad1b_object_t
*
p_obj
,
uint32_t
*
p_buffer
)
¶
-
get sensor serial number.
- Parameters :
-
p_obj – the device instance object
p_serial – pointer to uint32_t where serial number will be stored
- Return values :
-
0 – in case of success, 1 otherwise
Types ¶
Enums
Typedefs
-
typedef
struct
sht40ad1b_object_s
sht40ad1b_object_t
¶
-
SHT40AD1B object structure type
-
struct
sht40ad1b_object_s
¶
-
SHT40AD1B object structure.
Public Members
-
sht40ad1b_io_t
io_ctx
¶
-
IO context
-
sht40ad1b_io_t
io_ctx
¶
-
enum
sht40ad1b_drv_status_t
-
Driver status.
Values:
-
enumerator
SHT40AD1B_OK
-
Success
-
enumerator
SHT40AD1B_ERROR
-
Error
-
enumerator
SHT40AD1B_OK
-
union
sht40ad1b_axis3bit16_t
¶
-
#include <sht40ad1b.h>
3-axis 16-bit union.
-
union
sht40ad1b_axis1bit16_t
¶
-
#include <sht40ad1b.h>
1-axis 16-bit union.
-
union
sht40ad1b_axis3bit32_t
¶
-
#include <sht40ad1b.h>
3-axis 32-bit union.
-
union
sht40ad1b_axis1bit32_t
¶
-
#include <sht40ad1b.h>
1-axis 32-bit union.