Dependents:
mbed_HP03SA_LM77
« Back to documentation index
LM77 Class Reference
Create an LM77 Class instance.
More...
#include <LM77.h >
Detailed Description
Create an LM77 Class instance.
Definition at line 129 of file LM77.h .
Member Enumeration Documentation
Represents OS pin fault queue length of the LM77 .
Enumerator:
FAULT_QUEUE_1
Pins and flags are asserted after 1 fault.
FAULT_QUEUE_4
Pins and flags are asserted after 4 consecutive faults.
Definition at line 156 of file LM77.h .
Represents INT pin mode of the LM77 .
Enumerator:
INT_COMPARATOR
INT pin asserted when temp exceeds an alert threshold, and de-asserted when temp crosses alert hysteresis threshold or when LM77 is read.
It will be re-asserted when condition is still true after reading.
INT_EVENT
INT pin asserted when temp reaches an alert threshold or threshold +/- hysteris and only de-asserted when a register has been read.
It will be re-asserted when next event occurs.
Definition at line 142 of file LM77.h .
Represents Pin polarity of the LM77 .
Enumerator:
ACTIVE_LOW
Pin is a logic low when asserted, and a logic high when de-asserted.
ACTIVE_HIGH
Pin is a logic high when asserted, and a logic low when de-asserted.
Definition at line 149 of file LM77.h .
Represents the power mode of the LM77 .
Enumerator:
POWER_NORMAL
Chip is enabled and samples every 100ms.
POWER_SHUTDOWN
Chip is in low-power shutdown mode.
Definition at line 135 of file LM77.h .
Constructor & Destructor Documentation
LM77
(
I2C *
i2c ,
char
deviceAddress = LM77_SA0
)
Create an LM77 device instance.
Parameters:
i2c I2C Bus
char deviceAddress I2C slaveaddress (defaults to LM77_SA0).
i2c I2C Bus
char deviceAddress I2C slaveaddress
Definition at line 38 of file LM77.cpp .
Member Function Documentation
float celsiusToFahrenheit
(
float
celsius )
Convert Temperature from °Celsius into °Fahrenheit.
Parameters:
Returns: float temperature in °Fahrenheit
Definition at line 413 of file LM77.cpp .
int getAlertFlags
(
void
)
Get the Alert flags of the LM77 .
Returns: The current Alert flags as int.
Definition at line 374 of file LM77.cpp .
Get the current alert temperature hysteresis of the LM77 Reset value is 2.0 °C.
Returns: The current alert temperature hysteresis in °C.
Definition at line 332 of file LM77.cpp .
float getCritAlertTemp
(
)
Get the current critical alert temperature threshold of the LM77 Reset value is 80.0 °C.
Get the current Critical alert temperature threshold of the LM77 Reset value is 80.0 °C.
Returns: The current crtitcal alert temperature threshold in °C.
The current Critical alert temperature threshold in °C.
Definition at line 265 of file LM77.cpp .
Get the current pin and flag fault queue length of the LM77 Reset value is FAULT_QUEUE_1, Pins and flags are asserted after 1 fault.
Get the current pin and flag fault queue length of the LM77 .
Returns: The current pin and flag fault queue length as an FaultQueue enum.
Definition at line 224 of file LM77.cpp .
float getHighAlertTemp
(
)
Get the current High temperature alert threshold of the LM77 Reset value is 64.0 °C.
Returns: The current High temperature alert threshold in °C.
Definition at line 309 of file LM77.cpp .
Get the current INT pin mode of the LM77 Reset value is INT_COMPARATOR.
Get the current INT pin mode of the LM77 .
Returns: The current INT pin mode as an IntMode enum.
Definition at line 103 of file LM77.cpp .
Get the current INT pin polarity of the LM77 Reset value is ACTIVE_LOW.
Get the current INT pin polarity of the LM77 .
Returns: The current INT pin polarity as an PinPolarity enum.
Definition at line 145 of file LM77.cpp .
float getLowAlertTemp
(
)
Get the current Low temperature alert threshold of the LM77 Reset value is 10.0 °C.
Returns: The current Low temperature alert threshold in °C.
Definition at line 287 of file LM77.cpp .
Get the current power mode of the LM77 .
Returns: The current power mode as a PowerMode enum.
Definition at line 62 of file LM77.cpp .
Get Status.
Returns: bool Sensor ready
Definition at line 46 of file LM77.cpp .
Get the current T_CRIT_A pin polarity of the LM77 Reset value is ACTIVE_LOW.
Get the current T_CRIT_A pin polarity of the LM77 .
Returns: The current T_CRIT_A pin polarity as an PinPolarity enum.
Definition at line 184 of file LM77.cpp .
float getTemperature
(
void
)
Get Temperature as float in °Celsius.
Returns: float Temperature in °Celsius
Definition at line 395 of file LM77.cpp .
int getTemperatureInt
(
void
)
Get Temperature as Int in °Celsius x 10.
Get Temperature as int in °Celsius x 10.
Returns: int Temperature in °Celsius x 10
Definition at line 354 of file LM77.cpp .
A shorthand for Temperature()
Returns: The current temperature measurement in °C.
Definition at line 401 of file LM77.cpp .
void setAlertHyst
(
float
temp )
Set the alert temperature hysteresis of the LM77 Reset value is 2.0 °C.
Parameters:
temp The new alert temperature hysteris in °C.
temp The new alert temperature hysteresis in °C.
Definition at line 343 of file LM77.cpp .
void setCritAlertTemp
(
float
temp )
Set the Critical alert temperature threshold of the LM77 Reset value is 80.0 °C.
Set the critical alert temperature threshold of the LM77 Reset value is 80.0 °C.
Parameters:
temp The new Critical alert temperature threshold in °C.
temp The new critical alert temperature threshold in °C.
Definition at line 276 of file LM77.cpp .
Set the pin and flag fault queue length of the LM77 .
Parameters:
queue The new pin and flag fault queue length as an FaultQueue enum.
Definition at line 243 of file LM77.cpp .
void setHighAlertTemp
(
float
temp )
Set the High temperature alert threshold of the LM77 Reset value is 64.0 °C.
Parameters:
temp The new High temperature alert threshold in °C.
Definition at line 320 of file LM77.cpp .
Set the INT pin mode of the LM77 .
Parameters:
mode The new INT pin mode as an IntMode enum.
Definition at line 122 of file LM77.cpp .
Set the INT pin polarity of the LM77 .
Parameters:
polarity The new INT pin polarity as an PinPolarity enum.
Definition at line 163 of file LM77.cpp .
void setLowAlertTemp
(
float
temp )
Set the current Low temperature alert threshold of the LM77 Reset value is 10.0 °C.
Parameters:
temp The new Low alert temperature threshold in °C.
Definition at line 298 of file LM77.cpp .
Set the power mode of the LM77 .
Parameters:
mode The new power mode as a PowerMode enum.
Definition at line 81 of file LM77.cpp .
Set the T_CRIT_A pin polarity of the LM77 .
Parameters:
polarity The new T_CRIT_A pin polarity as an PinPolarity enum.
Definition at line 202 of file LM77.cpp .