Struct atmega_hal::pac::TWI
source · pub struct TWI { /* private fields */ }Expand description
Two Wire Serial Interface
Implementations§
source§impl TWI
impl TWI
sourcepub const PTR: *const RegisterBlock = {0xb8 as *const avr_device::atmega2560::twi::RegisterBlock}
pub const PTR: *const RegisterBlock = {0xb8 as *const avr_device::atmega2560::twi::RegisterBlock}
Pointer to the register block
sourcepub const fn ptr() -> *const RegisterBlock
pub const fn ptr() -> *const RegisterBlock
Return the pointer to the register block
Trait Implementations§
source§impl I2cOps<Atmega, Pin<Input, PD1>, Pin<Input, PD0>> for TWI
impl I2cOps<Atmega, Pin<Input, PD1>, Pin<Input, PD0>> for TWI
source§fn raw_setup<CLOCK: Clock>(&mut self, speed: u32)
fn raw_setup<CLOCK: Clock>(&mut self, speed: u32)
Setup the bus for operation at a certain speed. Read more
source§fn raw_start(&mut self, address: u8, direction: Direction) -> Result<(), Error>
fn raw_start(&mut self, address: u8, direction: Direction) -> Result<(), Error>
Start a bus transaction to a certain
address in either read or write mode. Read moresource§fn raw_write(&mut self, bytes: &[u8]) -> Result<(), Error>
fn raw_write(&mut self, bytes: &[u8]) -> Result<(), Error>
Write some bytes to the bus. Read more