Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches
temp_sensor_config.h File Reference
#include "userDef.h"
#include "sensor/device/EMC1413.h"

Go to the source code of this file.

Overview

Temperature Sensor Configuration and Driver Selection.

Author
Efinix Inc

This file automatically selects the correct I2C address and driver structure based on the user-defined ACTIVE_TEMP_SENSOR_TYPE.

Definition in file temp_sensor_config.h.

Macros

Automatic Driver Selection

Resolves the low-level driver implementation based on ACTIVE_TEMP_SENSOR_TYPE. This allows the user to switch Temperature Sensor devices by changing a single configuration value in userDef.h.

Note
  • User can switch between supported Temperature Sensor devices by changing the ACTIVE_TEMP_SENSOR_TYPE macro.
    • Add #define ACTIVE_TEMP_SENSOR_TYPE SENSOR_TYPE_EMC1413 in userDef.h to use EMC1413 Temperature Sensor.
  • For custom Temperature Sensor devices, include the custom driver header and define TEMP_SENSOR_CTRL and TEMP_SENSOR_DRIVER macros accordingly.
    • Refer to userDef.h in tempSensorDemo of including a custom Temperature Sensor driver.
#define TEMP_SENSOR_CTRL   TEMP_EMC1413_ADDR
 I2C Address for the currently selected RTC (PCF8523).
#define TEMP_SENSOR_DRIVER   emc1413_driver