|
M5Unit-THERMO 0.3.0 git rev:4c4f8b5
|
Unit Thermal2. More...
#include <unit_Thermal2.hpp>
Classes | |
| struct | config_t |
| Settings for begin. More... | |
Public Member Functions | |
| UnitThermal2 (const uint8_t addr=DEFAULT_ADDRESS) | |
| virtual bool | begin () override |
| virtual void | update (const bool force=false) override |
| bool | readFirmwareVersion (uint16_t &ver) |
| Read the firmware version. | |
Settings for begin | |
| config_t | config () |
| Gets the configration. | |
| void | config (const config_t &cfg) |
| Set the configration. | |
Periodic measurement | |
| bool | startPeriodicMeasurement (const thermal2::Refresh rate) |
| Start periodic measurement. | |
| bool | startPeriodicMeasurement () |
| Start periodic measurement in the current settings. | |
| bool | stopPeriodicMeasurement () |
| Stop periodic measurement. | |
Single shot measurement | |
| bool | measureSingleshot (thermal2::Data &page0, thermal2::Data &page1) |
| Measurement single shot. | |
Settings | |
| bool | readFunctionControl (uint8_t &value) |
| Read the function control. | |
| bool | readBuzzerEnabled (bool &enabled) |
| Read the buzzer enabled. | |
| bool | readLEDEnabled (bool &enabled) |
| Reads the LED enabled. | |
| bool | writeFunctionControl (const uint8_t value, const bool verify=true) |
| Write the function control. | |
| bool | writeBuzzerEnabled (const bool enabled) |
| Write the buzzer enable status. | |
| bool | writeLEDEnabled (const bool enabled) |
| Write the LED enable status. | |
| bool | readRefreshRate (thermal2 ::Refresh &rate) |
| Read the refresh rate. | |
| bool | writeRefreshRate (const thermal2::Refresh rate) |
| Write the refresh rate. | |
| bool | readNoiseFilterLevel (uint8_t &level) |
| Read the noise filter level. | |
| bool | writeNoiseFilterLevel (const uint8_t level) |
| Write the noise filter level. | |
| bool | readTemeratureMonitorSize (uint8_t &wid, uint8_t &hgt) |
| Read the temperature monitor size. | |
| bool | writeTemeratureMonitorSize (const uint8_t wid, const uint8_t hgt) |
| Write the temperature monitor size. | |
Alarm | |
| bool | readAlarmEnabled (uint8_t &enabled_bits) |
| Read the alarm control. | |
| bool | writeAlarmEnabled (const uint8_t enabled_bits) |
| Read the alarm control. | |
| bool | readAlarmTemperature (const bool highlow, uint16_t &raw) |
| Read the alarm temperature threshold. | |
| bool | readAlarmTemperature (const bool highlow, float &celsius) |
| Read the alarm temperature threshold. | |
| bool | writeAlarmTemperature (const bool highlow, const uint16_t raw) |
| Write the alarm temperature threshold. | |
| template<typename T , typename std::enable_if< std::is_floating_point< T >::value, std::nullptr_t >::type = nullptr> | |
| bool | writeAlarmTemperature (const bool highlow, const T celsius) |
| Write the alarm temperature threshold. | |
| bool | readAlarmLED (const bool highlow, uint32_t &rgb) |
| Read the alarm LED color. | |
| bool | writeAlarmLED (const bool highlow, const uint32_t rgb) |
| Write the alarm LED color. | |
| bool | writeAlarmLED (const bool highlow, const uint8_t r, const uint8_t g, const uint8_t b) |
| Write the alarm LED color. | |
| bool | readAlarmBuzzer (const bool highlow, uint16_t &freq, uint8_t &interval) |
| Read the alarm buzzer settings. | |
| bool | writeAlarmBuzzer (const bool highlow, const uint16_t freq, const uint8_t interval) |
| Write the alarm buzzer settings. | |
Buzzer | |
| |
| bool | readBuzzer (uint16_t &freq, uint8_t &duty) |
| Read the buzzer settings. | |
| bool | writeBuzzer (const uint16_t freq, const uint8_t duty, const bool verify=true) |
| Write the buzzer settings. | |
| bool | writeBuzzerDuty (const uint8_t duty) |
| Write the buzzer duty settings. | |
| bool | readBuzzerControl (bool &enabled) |
| Read the Buzzer control. | |
| bool | writeBuzzerControl (const bool enabled) |
| Write the Buzzer control. | |
LED | |
| |
| bool | readLED (uint32_t &rgb) |
| Read the LED color. | |
| bool | writeLED (const uint32_t rgb, const bool verify=true) |
| Write the LED color. | |
| bool | writeLED (const uint8_t r, const uint8_t g, const uint8_t b, const bool verify=true) |
| Write the LED color. | |
Button | |
| bool | readButtonStatus (uint8_t &bs) |
| Read the button status. | |
| bool | isPressed () const |
| Is button pressed? | |
| bool | wasPressed () |
| Was button pressed? | |
| bool | wasReleased () |
| Was button released? | |
| bool | wasClicked () |
| Was button clicked? | |
| bool | wasHold () |
| Was button hold? | |
| bool | isHolding () |
| Is button holding? | |
I2C Address | |
| |
| bool | changeI2CAddress (const uint8_t i2c_address) |
| Change device I2C address. | |
| bool | readI2CAddress (uint8_t &i2c_address) |
| Read device I2C address. | |
Protected Member Functions | |
| bool | read_function_control_bit (const uint8_t bit, bool &enabled) |
| bool | write_function_control_bit (const uint8_t bit, const bool enabled) |
| bool | request_data () |
| bool | read_data_status (uint8_t s[2]) |
| bool | read_data (thermal2::Data &data) |
| bool | start_periodic_measurement (const thermal2::Refresh rate) |
| bool | start_periodic_measurement () |
| bool | stop_periodic_measurement () |
| bool | read_register (const uint8_t reg, uint8_t *v, const uint32_t len) |
| bool | read_register8 (const uint8_t reg, uint8_t &v) |
| bool | read_register16LE (const uint8_t reg, uint16_t &v) |
| bool | read_register16BE (const uint8_t reg, uint16_t &v) |
| M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitThermal2, thermal2::Data) | |
Unit Thermal2.
| bool m5::unit::UnitThermal2::changeI2CAddress | ( | const uint8_t | i2c_address | ) |
Change device I2C address.
| i2c_address | I2C address |
|
inline |
Is button holding?
|
inline |
Is button pressed?
| bool m5::unit::UnitThermal2::measureSingleshot | ( | thermal2::Data & | page0, |
| thermal2::Data & | page1 ) |
Measurement single shot.
| [out] | page0 | Measuerd data subpage 0 |
| [out] | page1 | Measuerd data subpage 1 |
| bool m5::unit::UnitThermal2::readAlarmBuzzer | ( | const bool | highlow, |
| uint16_t & | freq, | ||
| uint8_t & | interval ) |
Read the alarm buzzer settings.
| highlow | Target False:low True:high | |
| [out] | freq | Frequency |
| [out] | interval | Interval (10ms) |
| bool m5::unit::UnitThermal2::readAlarmEnabled | ( | uint8_t & | enabled_bits | ) |
Read the alarm control.
| [out] | enabled_bits | Enabled temperature alarm bits |
| bool m5::unit::UnitThermal2::readAlarmLED | ( | const bool | highlow, |
| uint32_t & | rgb ) |
Read the alarm LED color.
| highlow | Target False:low True:high | |
| [out] | rgb | RGB24 color |
| bool m5::unit::UnitThermal2::readAlarmTemperature | ( | const bool | highlow, |
| float & | celsius ) |
Read the alarm temperature threshold.
| highlow | Target False:low True:high | |
| [out] | celsius | Temperature |
| bool m5::unit::UnitThermal2::readAlarmTemperature | ( | const bool | highlow, |
| uint16_t & | raw ) |
Read the alarm temperature threshold.
| highlow | Target False:low True:high | |
| [out] | raw | Temperature (raw) |
| bool m5::unit::UnitThermal2::readButtonStatus | ( | uint8_t & | bs | ) |
Read the button status.
| [out] | bs | Button status |
| bool m5::unit::UnitThermal2::readBuzzer | ( | uint16_t & | freq, |
| uint8_t & | duty ) |
Read the buzzer settings.
| [out] | freq | Frequency |
| [out] | duty | 0 - 255 |
|
inline |
Read the Buzzer control.
| [out] | enabled | True:enabled False;disabled |
| bool m5::unit::UnitThermal2::readFirmwareVersion | ( | uint16_t & | ver | ) |
Read the firmware version.
| [out] | ver | Version high:major low:minor |
| bool m5::unit::UnitThermal2::readFunctionControl | ( | uint8_t & | value | ) |
Read the function control.
| [out] | value | Function control value |
| bool m5::unit::UnitThermal2::readI2CAddress | ( | uint8_t & | i2c_address | ) |
Read device I2C address.
| [out] | i2c_address | I2C address |
| bool m5::unit::UnitThermal2::readLED | ( | uint32_t & | rgb | ) |
Read the LED color.
| [out] | rgb | RGB24 color |
| bool m5::unit::UnitThermal2::readNoiseFilterLevel | ( | uint8_t & | level | ) |
Read the noise filter level.
| [out] | level | Filter level |
| bool m5::unit::UnitThermal2::readRefreshRate | ( | thermal2 ::Refresh & | rate | ) |
Read the refresh rate.
| [out] | rate | Refresh rate |
| bool m5::unit::UnitThermal2::readTemeratureMonitorSize | ( | uint8_t & | wid, |
| uint8_t & | hgt ) |
Read the temperature monitor size.
| [out] | wid | Width (0-15) |
| [out] | hgt | Height (0-11) |
|
inline |
Start periodic measurement.
| rate | Refresh rate |
|
inline |
Stop periodic measurement.
|
inline |
Was button clicked?
|
inline |
Was button hold?
|
inline |
Was button pressed?
|
inline |
Was button released?
| bool m5::unit::UnitThermal2::writeAlarmBuzzer | ( | const bool | highlow, |
| const uint16_t | freq, | ||
| const uint8_t | interval ) |
Write the alarm buzzer settings.
| highlow | Target False:low True:high |
| freq | Frequency |
| interval | Interval (10ms) |
| bool m5::unit::UnitThermal2::writeAlarmEnabled | ( | const uint8_t | enabled_bits | ) |
Read the alarm control.
| [out] | enabled_bits | Enabled temperature alarm bits |
|
inline |
Write the alarm LED color.
| highlow | Target False:low True:high |
| rgb | RGB24 color |
| bool m5::unit::UnitThermal2::writeAlarmLED | ( | const bool | highlow, |
| const uint8_t | r, | ||
| const uint8_t | g, | ||
| const uint8_t | b ) |
Write the alarm LED color.
| highlow | Target False:low True:high |
| r | Red |
| g | Green |
| b | Blue |
|
inline |
Write the alarm temperature threshold.
| highlow | Target False:low True:high |
| celsius | Temperature |
| bool m5::unit::UnitThermal2::writeAlarmTemperature | ( | const bool | highlow, |
| const uint16_t | raw ) |
Write the alarm temperature threshold.
| highlow | Target False:low True:high |
| raw | Temperature (raw) |
| bool m5::unit::UnitThermal2::writeBuzzer | ( | const uint16_t | freq, |
| const uint8_t | duty, | ||
| const bool | verify = true ) |
Write the buzzer settings.
| freq | Frequency |
| duty | Duty 0 - 255 |
| verify | Verify the value is written if true z(it is not reflected immediately) |
|
inline |
Write the Buzzer control.
| enabled | True:enabled False;disabled |
| bool m5::unit::UnitThermal2::writeBuzzerDuty | ( | const uint8_t | duty | ) |
Write the buzzer duty settings.
| duty | Duty 0 - 255 |
| bool m5::unit::UnitThermal2::writeFunctionControl | ( | const uint8_t | value, |
| const bool | verify = true ) |
Write the function control.
| value | Function control value |
| verify | Verify the value is written if true z(it is not reflected immediately) |
|
inline |
Write the LED color.
| rgb | RGB24 color |
| verify | Verify the value is written if true z(it is not reflected immediately) |
| bool m5::unit::UnitThermal2::writeLED | ( | const uint8_t | r, |
| const uint8_t | g, | ||
| const uint8_t | b, | ||
| const bool | verify = true ) |
Write the LED color.
| r | Red |
| g | Green |
| b | Blue |
| verify | Verify the value is written if true z(it is not reflected immediately) |
| bool m5::unit::UnitThermal2::writeNoiseFilterLevel | ( | const uint8_t | level | ) |
Write the noise filter level.
| level | Filter level |
| bool m5::unit::UnitThermal2::writeRefreshRate | ( | const thermal2::Refresh | rate | ) |
Write the refresh rate.
| rate | Refresh rate |
| bool m5::unit::UnitThermal2::writeTemeratureMonitorSize | ( | const uint8_t | wid, |
| const uint8_t | hgt ) |
Write the temperature monitor size.
| wid | Width (0-15) |
| hgt | Heigh (0-11) |