TT Zephyr Platforms 19.5.0-rc1
Tenstorrent Firmware
Loading...
Searching...
No Matches
telemetry_internal.c File Reference

Functions

 SENSOR_DT_READ_IODEV (ts_avg_iodev, DT_NODELABEL(pvt), {SENSOR_CHAN_PVT_TT_BH_TS_AVG, 0})
 RTIO_DEFINE (ts_avg_ctx, 1, 1)
void ReadTelemetryInternal (int64_t max_staleness, TelemetryInternalData *data)
 Read telemetry values that are shared by multiple components.

Variables

static int64_t last_update_time
static TelemetryInternalData internal_data
static const struct device *const pvt = DEVICE_DT_GET(DT_NODELABEL(pvt))
static uint8_t ts_avg_buf [sizeof(struct sensor_value)]

Function Documentation

◆ ReadTelemetryInternal()

void ReadTelemetryInternal ( int64_t max_staleness,
TelemetryInternalData * data )

Read telemetry values that are shared by multiple components.

This function will update the cached TelemetryInternalData values if necessary. Then return a copy of the values through the *data pointer.

Parameters
max_stalenessMaximum time interval in milliseconds since the last update
dataPointer to the TelemetryInternalData struct to fill with the values

◆ RTIO_DEFINE()

RTIO_DEFINE ( ts_avg_ctx ,
1 ,
1  )

◆ SENSOR_DT_READ_IODEV()

SENSOR_DT_READ_IODEV ( ts_avg_iodev ,
DT_NODELABEL(pvt) ,
{SENSOR_CHAN_PVT_TT_BH_TS_AVG, 0}  )

Variable Documentation

◆ internal_data

TelemetryInternalData internal_data
static

◆ last_update_time

int64_t last_update_time
static

◆ pvt

const struct device* const pvt = DEVICE_DT_GET(DT_NODELABEL(pvt))
static

◆ ts_avg_buf

uint8_t ts_avg_buf[sizeof(struct sensor_value)]
static