Struct eeprom24x::Eeprom24x [−][src]
pub struct Eeprom24x<I2C, IC> { /* fields omitted */ }
EEPROM24X driver
Methods
impl<I2C, E, IC> Eeprom24x<I2C, IC> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
impl<I2C, E, IC> Eeprom24x<I2C, IC> where
I2C: Write<Error = E> + WriteRead<Error = E>,
Common methods
pub fn destroy(self) -> I2C
[src]
pub fn destroy(self) -> I2C
Destroy driver instance, return I²C bus instance.
pub fn write_byte(
&mut self,
address: &[u8; 2],
data: u8
) -> Result<(), Error<E>>
[src]
pub fn write_byte(
&mut self,
address: &[u8; 2],
data: u8
) -> Result<(), Error<E>>
Write a single byte in an address.
After writing a byte, the EEPROM enters an internally-timed write cycle to the nonvolatile memory. During this time all inputs are disabled and the EEPROM will not respond until the write is complete.
pub fn read_byte(&mut self, address: &[u8; 2]) -> Result<u8, Error<E>>
[src]
pub fn read_byte(&mut self, address: &[u8; 2]) -> Result<u8, Error<E>>
Read a single byte from an address.
pub fn read_data(
&mut self,
address: &[u8; 2],
data: &mut [u8]
) -> Result<(), Error<E>>
[src]
pub fn read_data(
&mut self,
address: &[u8; 2],
data: &mut [u8]
) -> Result<(), Error<E>>
Read starting in an address as many bytes as necessary to fill the data array provided.
impl<I2C, E> Eeprom24x<I2C, IC24x32> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
impl<I2C, E> Eeprom24x<I2C, IC24x32> where
I2C: Write<Error = E> + WriteRead<Error = E>,
Specialization for 24x32 devices (e.g. AT24C32)
pub fn new_24x32(i2c: I2C, address: SlaveAddr) -> Self
[src]
pub fn new_24x32(i2c: I2C, address: SlaveAddr) -> Self
Create a new instance of a 24x32 device (e.g. AT24C32)
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
[src]
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
Write up to a page starting in an address.
After writing a byte, the EEPROM enters an internally-timed write cycle to the nonvolatile memory. During this time all inputs are disabled and the EEPROM will not respond until the write is complete.
impl<I2C, E, IC> Eeprom24x<I2C, IC> where
I2C: Read<Error = E>,
[src]
impl<I2C, E, IC> Eeprom24x<I2C, IC> where
I2C: Read<Error = E>,
Specialization for platforms which implement embedded_hal::blocking::i2c::Read
pub fn read_current_address(&mut self) -> Result<u8, Error<E>>
[src]
pub fn read_current_address(&mut self) -> Result<u8, Error<E>>
Read the contents of the last address accessed during the last read or write operation, incremented by one.
Note: This may not be available on your platform.
impl<I2C, E> Eeprom24x<I2C, IC24x64> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
impl<I2C, E> Eeprom24x<I2C, IC24x64> where
I2C: Write<Error = E> + WriteRead<Error = E>,
Specialization for 24x64 devices (e.g. AT24C64)
pub fn new_24x64(i2c: I2C, address: SlaveAddr) -> Self
[src]
pub fn new_24x64(i2c: I2C, address: SlaveAddr) -> Self
Create a new instance of a 24x64 device (e.g. AT24C64)
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
[src]
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
Write up to a page starting in an address.
After writing a byte, the EEPROM enters an internally-timed write cycle to the nonvolatile memory. During this time all inputs are disabled and the EEPROM will not respond until the write is complete.
impl<I2C, E> Eeprom24x<I2C, IC24x128> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
impl<I2C, E> Eeprom24x<I2C, IC24x128> where
I2C: Write<Error = E> + WriteRead<Error = E>,
Specialization for 24x128 devices (e.g. AT24C128)
pub fn new_24x128(i2c: I2C, address: SlaveAddr) -> Self
[src]
pub fn new_24x128(i2c: I2C, address: SlaveAddr) -> Self
Create a new instance of a 24x128 device (e.g. AT24C128)
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
[src]
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
Write up to a page starting in an address.
After writing a byte, the EEPROM enters an internally-timed write cycle to the nonvolatile memory. During this time all inputs are disabled and the EEPROM will not respond until the write is complete.
impl<I2C, E> Eeprom24x<I2C, IC24x256> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
impl<I2C, E> Eeprom24x<I2C, IC24x256> where
I2C: Write<Error = E> + WriteRead<Error = E>,
Specialization for 24x256 devices (e.g. AT24C256)
pub fn new_24x256(i2c: I2C, address: SlaveAddr) -> Self
[src]
pub fn new_24x256(i2c: I2C, address: SlaveAddr) -> Self
Create a new instance of a 24x256 device (e.g. AT24C256)
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
[src]
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
Write up to a page starting in an address.
After writing a byte, the EEPROM enters an internally-timed write cycle to the nonvolatile memory. During this time all inputs are disabled and the EEPROM will not respond until the write is complete.
impl<I2C, E> Eeprom24x<I2C, IC24x512> where
I2C: Write<Error = E> + WriteRead<Error = E>,
[src]
impl<I2C, E> Eeprom24x<I2C, IC24x512> where
I2C: Write<Error = E> + WriteRead<Error = E>,
Specialization for 24x512 devices (e.g. AT24C512)
pub fn new_24x512(i2c: I2C, address: SlaveAddr) -> Self
[src]
pub fn new_24x512(i2c: I2C, address: SlaveAddr) -> Self
Create a new instance of a 24x512 device (e.g. AT24C512)
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
[src]
pub fn write_page(
&mut self,
address: &[u8; 2],
data: &[u8]
) -> Result<(), Error<E>>
Write up to a page starting in an address.
After writing a byte, the EEPROM enters an internally-timed write cycle to the nonvolatile memory. During this time all inputs are disabled and the EEPROM will not respond until the write is complete.
Trait Implementations
impl<I2C: Debug, IC: Debug> Debug for Eeprom24x<I2C, IC>
[src]
impl<I2C: Debug, IC: Debug> Debug for Eeprom24x<I2C, IC>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<I2C: Default, IC: Default> Default for Eeprom24x<I2C, IC>
[src]
impl<I2C: Default, IC: Default> Default for Eeprom24x<I2C, IC>