TempSensor_NXP_Arduino 1.1.0
Temperature sensor device operation sample code for Arduino
|
#include <TempSensor.h>
Public Types | |
enum | reg_num { Temp , Conf , T_LOW , T_HIGH } |
![]() | |
enum | reg_num { Temp , Conf , T_LOW , T_HIGH } |
![]() | |
enum | reg_num { Temp , Conf , T_LOW , T_HIGH } |
![]() | |
enum | reg_num { Temp , Conf , Thyst , Tos } |
![]() | |
enum | mode { COMPARATOR , INTERRUPT } |
Public Member Functions | |
P3T2030 (uint8_t i2c_address=(0xE0 > > 1)) | |
P3T2030 (TwoWire &wire, uint8_t i2c_address=(0xE4 > > 1)) | |
virtual | ~P3T2030 () |
virtual float | temp (void) |
virtual float | read (void) |
virtual void | thresholds (float v0, float v1) override |
virtual void | os_mode (mode flag) |
bool | ping (void) |
void | write_r8 (uint8_t reg, uint8_t val) |
void | write_r16 (uint8_t reg, uint16_t val) |
uint8_t | read_r8 (uint8_t reg) |
uint16_t | read_r16 (uint8_t reg) |
void | bit_op8 (uint8_t reg, uint8_t mask, uint8_t value) |
void | bit_op16 (uint8_t reg, uint16_t mask, uint16_t value) |
![]() | |
P3T1035 (uint8_t i2c_address=(0xE4 > > 1)) | |
P3T1035 (TwoWire &wire, uint8_t i2c_address=(0xE0 > > 1)) | |
virtual | ~P3T1035 () |
bool | ping (void) |
void | write_r8 (uint8_t reg, uint8_t val) |
void | write_r16 (uint8_t reg, uint16_t val) |
uint8_t | read_r8 (uint8_t reg) |
uint16_t | read_r16 (uint8_t reg) |
void | bit_op8 (uint8_t reg, uint8_t mask, uint8_t value) |
void | bit_op16 (uint8_t reg, uint16_t mask, uint16_t value) |
![]() | |
P3T1755 (uint8_t i2c_address=(0x98 > > 1)) | |
P3T1755 (TwoWire &wire, uint8_t i2c_address=(0x98 > > 1)) | |
virtual | ~P3T1755 () |
bool | ping (void) |
void | write_r8 (uint8_t reg, uint8_t val) |
void | write_r16 (uint8_t reg, uint16_t val) |
uint8_t | read_r8 (uint8_t reg) |
uint16_t | read_r16 (uint8_t reg) |
void | bit_op8 (uint8_t reg, uint8_t mask, uint8_t value) |
void | bit_op16 (uint8_t reg, uint16_t mask, uint16_t value) |
![]() | |
LM75B (uint8_t i2c_address=(0x90 > > 1)) | |
LM75B (TwoWire &wire, uint8_t i2c_address=(0x90 > > 1)) | |
virtual | ~LM75B () |
bool | ping (void) |
int | reg_w (uint8_t reg_adr, const uint8_t *data, uint16_t size) |
int | reg_w (uint8_t reg_adr, uint8_t data) |
int | reg_r (uint8_t reg_adr, uint8_t *data, uint16_t size) |
uint8_t | reg_r (uint8_t reg_adr) |
void | write_r8 (uint8_t reg, uint8_t val) |
void | write_r16 (uint8_t reg, uint16_t val) |
uint8_t | read_r8 (uint8_t reg) |
uint16_t | read_r16 (uint8_t reg) |
void | bit_op8 (uint8_t reg, uint8_t mask, uint8_t value) |
void | bit_op16 (uint8_t reg, uint16_t mask, uint16_t value) |
![]() | |
TempSensor (uint8_t i2c_address) | |
TempSensor (TwoWire &wire, uint8_t i2c_address) | |
virtual | ~TempSensor () |
P3T2030 class
About P3T2030: https://www.nxp.com/products/sensors/i3c-ic-digital-temp-sensors/i3c-ic-bus-2-0-c-accuracy-digital-temperature-sensor:P3T2030xUK
Definition at line 674 of file TempSensor.h.
enum P3T2030::reg_num |
Name of the P3T2030 registers
Enumerator | |
---|---|
Temp | Temp register |
Conf | Conf register |
T_LOW | Thyst register |
T_HIGH | Tos registe |
Definition at line 678 of file TempSensor.h.
P3T2030::P3T2030 | ( | uint8_t | i2c_address = (0xE0 >> 1) | ) |
Create a P3T2030 instance connected to specified I2C pins with specified address
i2c_address | I2C-bus address (default: (0xE0>>1)) |
Definition at line 90 of file TempSensor.cpp.
P3T2030::P3T2030 | ( | TwoWire & | wire, |
uint8_t | i2c_address = (0xE4 >> 1) ) |
Create a P3T1035 instance connected to specified I2C pins with specified address
wire | TwoWire instance |
i2c_address | I2C-bus address (default: (0xE0>>1)) |
Definition at line 91 of file TempSensor.cpp.
|
virtual |
Destructor of P3T1035
Definition at line 92 of file TempSensor.cpp.
void P3T2030::bit_op16 | ( | uint8_t | reg, |
uint16_t | mask, | ||
uint16_t | value ) |
void P3T2030::bit_op8 | ( | uint8_t | reg, |
uint8_t | mask, | ||
uint8_t | value ) |
Register overwriting with bit-mask
Register can be updated by bit level
reg | register index/address/pointer |
mask | bit-mask to protect overwriting |
value | value to overwrite |
|
virtual |
Set OS operation mode
This is dummy method since P3T2030 doesn't have the thermostat mode
flag | use P3T2030::COMPARATOR or P3T1755::INTERRUPT values |
Reimplemented from P3T1035.
bool P3T2030::ping | ( | void | ) |
Ping the device
|
virtual |
Get temperature value in degree Celsius [°C]
This method simply calls "temp()" method
Reimplemented from P3T1035.
uint16_t P3T2030::read_r16 | ( | uint8_t | reg | ) |
Register read, 16 bit
This 16 bit access may ot be common but it's useful for sensor devices
reg | register index/address/pointer |
uint8_t P3T2030::read_r8 | ( | uint8_t | reg | ) |
Register read, 8 bit
reg | register index/address/pointer |
|
virtual |
Get temperature value in degree Celsius [°C]
Reimplemented from P3T1035.
|
overridevirtual |
Set Overtemperature shutdown threshold (Tos) and hysteresis (Thyst) in degree Celsius [°C]
This method takes 2 values and higher value will set as the threshold (Tos) and another will be the hysteresis (Thyst)
v0 | a value in degree Celsius |
v1 | a value in degree Celsius |
Reimplemented from P3T1035.
void P3T2030::write_r16 | ( | uint8_t | reg, |
uint16_t | val ) |
Register write, 16 bit
This 16 bit access may ot be common but it's useful for sensor devices
reg | register index/address/pointer |
val | data value |
void P3T2030::write_r8 | ( | uint8_t | reg, |
uint8_t | val ) |
Register write, 8 bit
reg | register index/address/pointer |
val | data value |