COSA
An Object-Oriented Platform for Arduino Programming
AT24C256 Class Reference

#include <AT24CXX.hh>

Inheritance diagram for AT24C256:
Inheritance graph
Collaboration diagram for AT24C256:
Collaboration graph

Public Member Functions

 AT24C256 (uint8_t addr=0)
 
virtual bool is_ready ()
 
virtual int read (void *dest, const void *src, size_t size)
 
virtual int write (void *dest, const void *src, size_t size)
 

Public Attributes

const size_t SIZE
 
const uint16_t PAGE_MAX
 

Static Public Attributes

static Device eeprom
 

Detailed Description

The AT24C256 provides 262,144 bits of serial electrically erasable and programmable read only memory (EEPROM) organized as 32,768 words of 8 bits each. 64-Byte page write mode.

See Atmel Product description (Rev. 0670T–SEEPR–3/07), http://www.atmel.com/Images/doc0670.pdf

Definition at line 174 of file AT24CXX.hh.

Constructor & Destructor Documentation

AT24C256::AT24C256 ( uint8_t  addr = 0)
inline

Definition at line 176 of file AT24CXX.hh.

Member Function Documentation

bool AT24CXX::is_ready ( )
virtualinherited

Return true(1) if the device is ready, write cycle is completed, otherwise false(0).

Returns
bool

Reimplemented from EEPROM::Device.

Definition at line 47 of file AT24CXX.cpp.

int AT24CXX::read ( void *  dest,
const void *  src,
size_t  size 
)
virtualinherited

Read rom block with the given size into the buffer from the address. Return number of bytes read or negative error code.

Parameters
[in]destbuffer to read from rom.
[in]srcaddress in rom to read from.
[in]sizenumber of bytes to read.
Returns
number of bytes or negative error code.

Reimplemented from EEPROM::Device.

Definition at line 57 of file AT24CXX.cpp.

int AT24CXX::write ( void *  dest,
const void *  src,
size_t  size 
)
virtualinherited

Write rom block at given address with the contents from the buffer. Return number of bytes written or negative error code.

Parameters
[in]destaddress in rom to read write to.
[in]srcbuffer to write to rom.
[in]sizenumber of bytes to write.
Returns
number of bytes or negative error code.

Reimplemented from EEPROM::Device.

Definition at line 66 of file AT24CXX.cpp.

Member Data Documentation

EEPROM::Device EEPROM::Device::eeprom
staticinherited

Default EEPROM device; handling of internal EEPROM Data Memory.

Definition at line 75 of file EEPROM.hh.

const uint16_t AT24CXX::PAGE_MAX
inherited

Number of bytes in max write page size.

Definition at line 58 of file AT24CXX.hh.

const size_t AT24CXX::SIZE
inherited

Number of bytes on device.

Definition at line 53 of file AT24CXX.hh.


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