Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

Analog Devices ADT7604 Temperature Sensor. More...

Files

file  adt7604.h
 Header file for extended sensor API of ADT7604 sensor.

Data Structures

struct  adt7604_custom_sensor_data
 Custom sensor data row for adt7604_write_custom_sensor_data_table(). More...
struct  adt7604_custom_sensor_data_table
 Custom sensor table payload for adt7604_write_custom_sensor_data(). More...

Enumerations

enum  sensor_attribute_adt7604 { SENSOR_ATTR_ADT7604_TEMP_UNIT = SENSOR_ATTR_PRIV_START , SENSOR_ATTR_ADT7604_FILTER_NOTCH , SENSOR_ATTR_ADT7604_MUX_DELAY_US }
 ADT7604-specific sensor attributes. More...

Functions

int adt7604_write_custom_sensor_data_table (const struct device *dev, uint8_t chan_num, const struct adt7604_custom_sensor_data_table *table)
 Write custom sensor data into the ADT7604 custom sensor table.

Detailed Description

Analog Devices ADT7604 Temperature Sensor.

Enumeration Type Documentation

◆ sensor_attribute_adt7604

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

ADT7604-specific sensor attributes.

Enumerator
SENSOR_ATTR_ADT7604_TEMP_UNIT 

Temperature unit selection.

Set to 0 for Celsius (°C), 1 for Fahrenheit (°F) Read returns current temperature unit setting

SENSOR_ATTR_ADT7604_FILTER_NOTCH 

Digital filter notch frequency.

Set to: 0 = 50Hz and 60Hz rejection (simultaneous, default) 1 = 60Hz rejection only 2 = 50Hz rejection only Read returns current notch frequency setting

SENSOR_ATTR_ADT7604_MUX_DELAY_US 

MUX configuration delay.

Set delay in microseconds (0-25500, multiple of 100µs) The value is multiplied by 100µs internally Max extra MUX delay is 25.5ms (255 × 100µs) Read returns current delay in microseconds

Function Documentation

◆ adt7604_write_custom_sensor_data_table()

int adt7604_write_custom_sensor_data_table ( const struct device * dev,
uint8_t chan_num,
const struct adt7604_custom_sensor_data_table * table )

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

Write custom sensor data into the ADT7604 custom sensor table.

Writes the custom sensor data to the specified byte offset in the custom table (0x250 + custom_addr_ptr) and updates the channel configuration with the calculated address and length fields.

User is responsible for:

  • Managing custom_addr_ptr to avoid overlaps between channels
  • Ensuring custom_addr_ptr + data length <= 0x17F (table end)
Parameters
devADT7604 device pointer
chan_numHardware channel number (matches DT reg, 1-based)
tablePayload containing custom sensor data and starting byte offset
Returns
0 on success, -ENOTSUP if the channel type does not use the custom table, -EINVAL if address range invalid, -ENODEV if chan_num is not found, negative errno on SPI error