Zephyr Project API 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

TMP11X temperature sensors. More...

Files

file  tmp11x.h
 Header file for extended sensor API of TMP11X sensors.
 

Macros

#define EEPROM_TMP11X_SIZE   (4 * sizeof(uint16_t))
 EEPROM size for TMP11X.
 

Enumerations

enum  sensor_attribute_tmp_11x {
  SENSOR_ATTR_TMP11X_ONE_SHOT_MODE = SENSOR_ATTR_PRIV_START , SENSOR_ATTR_TMP11X_SHUTDOWN_MODE , SENSOR_ATTR_TMP11X_CONTINUOUS_CONVERSION_MODE , SENSOR_ATTR_TMP11X_ALERT_PIN_POLARITY ,
  SENSOR_ATTR_TMP11X_ALERT_MODE , SENSOR_ATTR_TMP11X_ALERT_PIN_SELECT
}
 Custom sensor attributes for TMP11X. More...
 

Functions

int tmp11x_eeprom_read (const struct device *dev, off_t offset, void *data, size_t len)
 Read from EEPROM.
 
int tmp11x_eeprom_write (const struct device *dev, off_t offset, const void *data, size_t len)
 Write to EEPROM.
 

Alert pin support macros

#define TMP11X_ALERT_PIN_ACTIVE_LOW   0
 Alert pin is active low.
 
#define TMP11X_ALERT_PIN_ACTIVE_HIGH   1
 Alert pin is active high.
 
#define TMP11X_ALERT_ALERT_MODE   0
 Alert mode.
 
#define TMP11X_ALERT_THERM_MODE   1
 Therm mode.
 
#define TMP11X_ALERT_PIN_ALERT_SEL   0
 Alert pin reflects the status of the alert flags.
 
#define TMP11X_ALERT_PIN_DR_SEL   1
 Alert pin reflects the status of the data ready flag.
 

Detailed Description

TMP11X temperature sensors.

Macro Definition Documentation

◆ EEPROM_TMP11X_SIZE

#define EEPROM_TMP11X_SIZE   (4 * sizeof(uint16_t))

#include <include/zephyr/drivers/sensor/tmp11x.h>

EEPROM size for TMP11X.

◆ TMP11X_ALERT_ALERT_MODE

#define TMP11X_ALERT_ALERT_MODE   0

◆ TMP11X_ALERT_PIN_ACTIVE_HIGH

#define TMP11X_ALERT_PIN_ACTIVE_HIGH   1

#include <include/zephyr/drivers/sensor/tmp11x.h>

Alert pin is active high.

◆ TMP11X_ALERT_PIN_ACTIVE_LOW

#define TMP11X_ALERT_PIN_ACTIVE_LOW   0

#include <include/zephyr/drivers/sensor/tmp11x.h>

Alert pin is active low.

◆ TMP11X_ALERT_PIN_ALERT_SEL

#define TMP11X_ALERT_PIN_ALERT_SEL   0

#include <include/zephyr/drivers/sensor/tmp11x.h>

Alert pin reflects the status of the alert flags.

◆ TMP11X_ALERT_PIN_DR_SEL

#define TMP11X_ALERT_PIN_DR_SEL   1

#include <include/zephyr/drivers/sensor/tmp11x.h>

Alert pin reflects the status of the data ready flag.

◆ TMP11X_ALERT_THERM_MODE

#define TMP11X_ALERT_THERM_MODE   1

Enumeration Type Documentation

◆ sensor_attribute_tmp_11x

#include <include/zephyr/drivers/sensor/tmp11x.h>

Custom sensor attributes for TMP11X.

Enumerator
SENSOR_ATTR_TMP11X_ONE_SHOT_MODE 

Turn on power saving/one shot mode.

SENSOR_ATTR_TMP11X_SHUTDOWN_MODE 

Shutdown the sensor.

SENSOR_ATTR_TMP11X_CONTINUOUS_CONVERSION_MODE 

Turn on continuous conversion.

SENSOR_ATTR_TMP11X_ALERT_PIN_POLARITY 

Configure alert pin polarity.

SENSOR_ATTR_TMP11X_ALERT_MODE 

Configure alert mode.

SENSOR_ATTR_TMP11X_ALERT_PIN_SELECT 

Configure alert pin mode for alert or DR.

Function Documentation

◆ tmp11x_eeprom_read()

int tmp11x_eeprom_read ( const struct device dev,
off_t  offset,
void *  data,
size_t  len 
)

#include <include/zephyr/drivers/sensor/tmp11x.h>

Read from EEPROM.

Parameters
devPointer to a tmp11x device
offsetOffset in the EEPROM
dataPointer to a buffer to store the read data
lenLength of the data to read
Returns
0 on success, negative error code on failure

◆ tmp11x_eeprom_write()

int tmp11x_eeprom_write ( const struct device dev,
off_t  offset,
const void *  data,
size_t  len 
)

#include <include/zephyr/drivers/sensor/tmp11x.h>

Write to EEPROM.

Parameters
devPointer to a tmp11x device
offsetOffset in the EEPROM
dataPointer to the data to write
lenLength of the data to write
Returns
0 on success, negative error code on failure