LCDDriver_NXP_Arduino 1.0.1
Temperature sensor device operation sample code for Arduino
Loading...
Searching...
No Matches
Public Member Functions | List of all members
M24C02 Class Reference

#include <M24C02.h>

Inheritance diagram for M24C02:

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, const uint8_t *dp, int length)
 
uint8_t read (int byte_adr)
 
int read (int byte_adr, uint8_t *dp, int length)
 

Detailed Description

I2C multiplexer and switch operation library for Arduino

Author
Tedd OKANO

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

Definition at line 24 of file M24C02.h.

Constructor & Destructor Documentation

◆ M24C02() [1/2]

M24C02::M24C02 ( uint8_t i2c_address = (0xA0 >> 1))

Create a M24C02 instance with specified address

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

Definition at line 3 of file M24C02.cpp.

◆ M24C02() [2/2]

M24C02::M24C02 ( TwoWire & wire,
uint8_t i2c_address = (0xA0 >> 1) )

Create a M24C02 instance with specified address

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

Definition at line 7 of file M24C02.cpp.

◆ ~M24C02()

M24C02::~M24C02 ( )
virtual

Definition at line 11 of file M24C02.cpp.

Member Function Documentation

◆ begin()

void M24C02::begin ( void )

Begin the device operation

This method turns-on the device

Definition at line 15 of file M24C02.cpp.

◆ read() [1/2]

uint8_t M24C02::read ( int byte_adr)

Read data

Parameters
byte_adrbyte address
Returns
1 byte read data

Definition at line 72 of file M24C02.cpp.

◆ read() [2/2]

int M24C02::read ( int byte_adr,
uint8_t * dp,
int length )

Definition at line 77 of file M24C02.cpp.

◆ wait_write_complete()

int M24C02::wait_write_complete ( int n)

Wait write complete

Parameters
nloop count (in mili-second)
Returns
remain count: 0 means timeout

Definition at line 61 of file M24C02.cpp.

Referenced by write(), and write().

◆ write() [1/2]

int M24C02::write ( int byte_adr,
const uint8_t * dp,
int length )

Definition at line 32 of file M24C02.cpp.

◆ write() [2/2]

int M24C02::write ( int byte_adr,
uint8_t data )

Write data

Parameters
byte_adrbyte address
data1 byte data for writing

Definition at line 19 of file M24C02.cpp.


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