Introduction
The tcDspTmp0506 class is used to obtain temperature readings from a TMP05 or TMP06 device. Up to 8 previous readings are averaged to obtain a temperature (provided in deg-C).
This class uses the generic RAM Block interface to the firmware.
- See also:
- MityDSP::tcDspTmp0506 Class Reference
-
MityDSP::tcDspRamBlock Class Reference
Example
This is a simple example of tcDspTmp0506 creation and usage:
{
float temp_degC;
unsigned int myAddress = 0xB0000400;
tcDspTmp0506 *myTemp;
myTemp = new tcDspTmp0506((void *)myAddress);
...
temp_degC = myTemp.getTemperature();
if (temp_degC < -900.0f)
{
tcDspError::report(<strong>FILE</strong>, <strong>LINE</strong>,
warning,
"Temperature reading unavailable.");
}
...
}