LCDDriver_NXP_Arduino 0.3.0
Temperature sensor device operation sample code for Arduino
|
#include <M24C02.h>
Public Member Functions | |
M24C02 (uint8_t i2c_address=(0xA0 > > 1)) | |
M24C02 (TwoWire &wire, uint8_t i2c_address=(0xA0 > > 1)) | |
virtual | ~M24C02 () |
void | begin (void) |
int | wait_write_complete (int n) |
int | write (int byte_adr, uint8_t data) |
int | write (int byte_adr, uint8_t *dp, int length) |
uint8_t | read (int byte_adr) |
int | read (int byte_adr, uint8_t *dp, int length) |
I2C multiplexer and switch operation library for Arduino
Released under the MIT license License M24C02 class
M24C02 class is a sample code for the PCA9846PW-ARD operation It demonstrates the switch operation with EEPROM on the shield board
M24C02::M24C02 | ( | uint8_t | i2c_address = (0xA0 >> 1) | ) |
Create a M24C02 instance with specified address
i2c_address | I2C-bus address (default: (0xA0>>1)) |
Definition at line 3 of file M24C02.cpp.
M24C02::M24C02 | ( | TwoWire & | wire, |
uint8_t | i2c_address = (0xA0 >> 1) |
||
) |
Create a M24C02 instance with specified address
wire | TwoWire instance |
i2c_address | I2C-bus address (default: (0xA0>>1)) |
Definition at line 7 of file M24C02.cpp.
|
virtual |
Definition at line 11 of file M24C02.cpp.
void M24C02::begin | ( | void | ) |
Begin the device operation
This method turns-on the device
Definition at line 15 of file M24C02.cpp.
uint8_t M24C02::read | ( | int | byte_adr | ) |
Read data
byte_adr | byte address |
Definition at line 72 of file M24C02.cpp.
int M24C02::read | ( | int | byte_adr, |
uint8_t * | dp, | ||
int | length | ||
) |
Definition at line 77 of file M24C02.cpp.
int M24C02::wait_write_complete | ( | int | n | ) |
Wait write complete
n | loop count (in mili-second) |
Definition at line 61 of file M24C02.cpp.
Referenced by write().
int M24C02::write | ( | int | byte_adr, |
uint8_t * | dp, | ||
int | length | ||
) |
Definition at line 32 of file M24C02.cpp.
int M24C02::write | ( | int | byte_adr, |
uint8_t | data | ||
) |
Write data
byte_adr | byte address |
data | 1 byte data for writing |
Definition at line 19 of file M24C02.cpp.