I2C_device_Arduino 1.0.5
An I²C utility class for Arduino
|
#include <test_LM75B.h>
Public Types | |
enum | mode { COMPARATOR , INTERRUPT } |
enum | reg_num { Temp , Conf , Thyst , Tos } |
Public Member Functions | |
test_LM75B (const uint8_t i2c_address=(0x90 > > 1)) | |
test_LM75B (TwoWire &wire, const uint8_t i2c_address=(0x90 > > 1)) | |
~test_LM75B () | |
float | read (void) |
void | thresholds (const float v0, const float v1) |
void | os_mode (const mode flag) |
![]() | |
I2C_device (uint8_t i2c_address, bool repeated_start_enable=true) | |
I2C_device (TwoWire &wire, uint8_t i2c_address, bool repeated_start_enable=true) | |
~I2C_device () | |
void | repeated_start_enable (bool en=true) |
bool | ping (void) |
int | tx (const uint8_t *data, uint16_t size, bool stop=true) |
int | rx (uint8_t *data, uint16_t size) |
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) |
Additional Inherited Members | |
![]() | |
static bool | ping (uint8_t addr) |
static void | scan (TwoWire &target_i2c=Wire, uint8_t stop=128) |
test_LM75B operation library for Arduino
Released under the MIT license License
test_LM75B class
test class for I2C_device
Definition at line 27 of file test_LM75B.h.
enum test_LM75B::mode |
Enumerator | |
---|---|
COMPARATOR | Comparator mode |
INTERRUPT | Interrupt mode |
Definition at line 30 of file test_LM75B.h.
enum test_LM75B::reg_num |
Name of the PCT2075 registers
Enumerator | |
---|---|
Temp | Temp register |
Conf | Conf register |
Thyst | Thyst register |
Tos | Tos registe |
Definition at line 36 of file test_LM75B.h.
test_LM75B::test_LM75B | ( | const uint8_t | i2c_address = (0x90 >> 1) | ) |
Create a PCT2075 instance connected to specified I2C pins with specified address
i2c_address | I2C-bus address (default: (0x90>>1)) |
Definition at line 5 of file test_LM75B.cpp.
test_LM75B::test_LM75B | ( | TwoWire & | wire, |
const uint8_t | i2c_address = (0x90 >> 1) ) |
Create a PCT2075 instance connected to specified I2C pins with specified address
wire | TwoWire instance |
i2c_address | I2C-bus address (default: (0x90>>1)) |
Definition at line 9 of file test_LM75B.cpp.
test_LM75B::~test_LM75B | ( | ) |
Destructor of PCT2075
Definition at line 13 of file test_LM75B.cpp.
void test_LM75B::os_mode | ( | const mode | flag | ) |
Set OS operation mode
flag | use PCT2075::COMPARATOR or PCT2075::INTERRUPT values |
Definition at line 31 of file test_LM75B.cpp.
float test_LM75B::read | ( | void | ) |
Get temperature value in degree Celsius [°C]
Definition at line 17 of file test_LM75B.cpp.
void test_LM75B::thresholds | ( | const float | v0, |
const float | v1 ) |
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 |
Definition at line 22 of file test_LM75B.cpp.