Struct sam4l::i2c::I2CHw [] [src]

pub struct I2CHw {
    registers: *mut TWIMRegisters,
    slave_registers: Option<*mut TWISRegisters>,
    master_clock: Clock,
    slave_clock: Option<Clock>,
    dma: Cell<Option<&'static DMAChannel>>,
    dma_pids: (DMAPeripheral, DMAPeripheral),
    master_client: Cell<Option<&'static I2CHwMasterClient>>,
    slave_client: Cell<Option<&'static I2CHwSlaveClient>>,
    on_deck: Cell<Option<(DMAPeripheral, usize)>>,
    slave_enabled: Cell<bool>,
    my_slave_address: Cell<u8>,
    slave_read_buffer: TakeCell<'static, [u8]>,
    slave_read_buffer_len: Cell<u8>,
    slave_read_buffer_index: Cell<u8>,
    slave_write_buffer: TakeCell<'static, [u8]>,
    slave_write_buffer_len: Cell<u8>,
    slave_write_buffer_index: Cell<u8>,
}

Fields

Methods

impl I2CHw
[src]

[src]

[src]

Set the clock prescaler and the time widths of the I2C signals in the CWGR register to make the bus run at a particular I2C speed.

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Handle possible interrupt for TWIS module.

[src]

Receive the bytes the I2C master is writing to us.

[src]

Prepare a buffer for the I2C master to read from after a read call.

[src]

[src]

[src]

Trait Implementations

impl DMAClient for I2CHw
[src]

[src]

impl I2CMaster for I2CHw
[src]

[src]

This enables the entire I2C peripheral

[src]

This disables the entire I2C peripheral

[src]

[src]

[src]

impl I2CSlave for I2CHw
[src]

[src]

[src]

This disables the entire I2C peripheral

[src]

[src]

[src]

[src]

impl I2CMasterSlave for I2CHw
[src]