TempSensor_NXP_Arduino 1.1.0
Temperature sensor device operation sample code for Arduino
Loading...
Searching...
No Matches
Public Member Functions | List of all members
P3T1085 Class Reference

#include <TempSensor.h>

Inheritance diagram for P3T1085:
P3T1755 LM75B TempSensor

Public Member Functions

 P3T1085 (uint8_t i2c_address=(0x90 > > 1))
 
 P3T1085 (TwoWire &wire, uint8_t i2c_address=(0x90 > > 1))
 
virtual ~P3T1085 ()
 
virtual void os_mode (mode flag) override
 
virtual bool clear (void)
 
virtual float temp (void)
 
virtual float read (void)
 
virtual void thresholds (float v0, float v1)
 
bool ping (void)
 
void write_r16 (uint8_t reg, uint16_t val)
 
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)
 
- Public Member Functions inherited from P3T1755
 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)
 
- Public Member Functions inherited from LM75B
 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)
 
- Public Member Functions inherited from TempSensor
 TempSensor (uint8_t i2c_address)
 
 TempSensor (TwoWire &wire, uint8_t i2c_address)
 
virtual ~TempSensor ()
 

Additional Inherited Members

- Public Types inherited from P3T1755
enum  reg_num { Temp , Conf , T_LOW , T_HIGH }
 
- Public Types inherited from LM75B
enum  reg_num { Temp , Conf , Thyst , Tos }
 
- Public Types inherited from TempSensor
enum  mode { COMPARATOR , INTERRUPT }
 

Detailed Description

P3T1085 class

About P3T1085: https://www.nxp.com/products/sensors/ic-digital-temperature-sensors/i3c-ic-bus-0-5-c-accurate-digital-temperature-sensor:P3T1085UK

Definition at line 450 of file TempSensor.h.

Constructor & Destructor Documentation

◆ P3T1085() [1/2]

P3T1085::P3T1085 ( uint8_t i2c_address = (0x90 >> 1))

Create a P3T1085 instance connected to specified I2C pins with specified address

Parameters
i2c_addressI2C-bus address (default: (0x90>>1))

Definition at line 61 of file TempSensor.cpp.

◆ P3T1085() [2/2]

P3T1085::P3T1085 ( TwoWire & wire,
uint8_t i2c_address = (0x90 >> 1) )

Create a P3T1085 instance connected to specified I2C pins with specified address

Parameters
wireTwoWire instance
i2c_addressI2C-bus address (default: (0x90>>1))

Definition at line 62 of file TempSensor.cpp.

◆ ~P3T1085()

P3T1085::~P3T1085 ( )
virtual

Destructor of P3T1085

Definition at line 63 of file TempSensor.cpp.

Member Function Documentation

◆ bit_op16()

void P3T1085::bit_op16 ( uint8_t reg,
uint16_t mask,
uint16_t value )

Referenced by os_mode().

◆ bit_op8()

void P3T1085::bit_op8 ( uint8_t reg,
uint8_t mask,
uint8_t value )

Register overwriting with bit-mask

Register can be updated by bit level

Parameters
regregister index/address/pointer
maskbit-mask to protect overwriting
valuevalue to overwrite

◆ clear()

bool P3T1085::clear ( void )
virtual

Clear ALERT (Clear interurpt)

Returns
true if FH flag in Congiguration register is set

Definition at line 69 of file TempSensor.cpp.

◆ os_mode()

void P3T1085::os_mode ( mode flag)
overridevirtual

Set OS operation mode

Parameters
flaguse P3T1085::COMPARATOR or P3T1085::INTERRUPT values

Reimplemented from P3T1755.

Definition at line 64 of file TempSensor.cpp.

◆ ping()

bool P3T1085::ping ( void )

Ping the device

Returns
true when ACK

◆ read()

virtual float P3T1085::read ( void )
virtual

Get temperature value in degree Celsius [°C]

This method simply calls "temp()" method

Returns
temperature value in degree Celsius [°C]

Reimplemented from P3T1755.

◆ read_r16()

uint16_t P3T1085::read_r16 ( uint8_t reg)

Register read, 16 bit

This 16 bit access may ot be common but it's useful for sensor devices

Parameters
regregister index/address/pointer
Returns
data value

Referenced by clear().

◆ temp()

virtual float P3T1085::temp ( void )
virtual

Get temperature value in degree Celsius [°C]

Returns
temperature value in degree Celsius [°C]

Reimplemented from P3T1755.

◆ thresholds()

virtual void P3T1085::thresholds ( float v0,
float v1 )
virtual

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)

Parameters
v0a value in degree Celsius
v1a value in degree Celsius

Reimplemented from P3T1755.

◆ write_r16()

void P3T1085::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

Parameters
regregister index/address/pointer
valdata value

The documentation for this class was generated from the following files: