Struct lpc11uxx::i2c::RegisterBlock

source ·
#[repr(C)]
pub struct RegisterBlock {
Show 13 fields pub conset: CONSET, pub stat: STAT, pub dat: DAT, pub adr0: ADR0, pub sclh: SCLH, pub scll: SCLL, pub conclr: CONCLR, pub mmctrl: MMCTRL, pub adr1: ADR, pub adr2: ADR, pub adr3: ADR, pub data_buffer: DATA_BUFFER, pub mask: [MASK; 4],
}
Expand description

Register block

Fields§

§conset: CONSET

0x00 - I2C Control Set Register. When a one is written to a bit of this register, the corresponding bit in the I2C control register is set. Writing a zero has no effect on the corresponding bit in the I2C control register.

§stat: STAT

0x04 - I2C Status Register. During I2C operation, this register provides detailed status codes that allow software to determine the next action needed.

§dat: DAT

0x08 - I2C Data Register. During master or slave transmit mode, data to be transmitted is written to this register. During master or slave receive mode, data that has been received may be read from this register.

§adr0: ADR0

0x0c - I2C Slave Address Register 0. Contains the 7-bit slave address for operation of the I2C interface in slave mode, and is not used in master mode. The least significant bit determines whether a slave responds to the General Call address.

§sclh: SCLH

0x10 - SCH Duty Cycle Register High Half Word. Determines the high time of the I2C clock.

§scll: SCLL

0x14 - SCL Duty Cycle Register Low Half Word. Determines the low time of the I2C clock. I2nSCLL and I2nSCLH together determine the clock frequency generated by an I2C master and certain times used in slave mode.

§conclr: CONCLR

0x18 - I2C Control Clear Register. When a one is written to a bit of this register, the corresponding bit in the I2C control register is cleared. Writing a zero has no effect on the corresponding bit in the I2C control register.

§mmctrl: MMCTRL

0x1c - Monitor mode control register.

§adr1: ADR

0x20 - I2C Slave Address Register. Contains the 7-bit slave address for operation of the I2C interface in slave mode, and is not used in master mode. The least significant bit determines whether a slave responds to the General Call address.

§adr2: ADR

0x24 - I2C Slave Address Register. Contains the 7-bit slave address for operation of the I2C interface in slave mode, and is not used in master mode. The least significant bit determines whether a slave responds to the General Call address.

§adr3: ADR

0x28 - I2C Slave Address Register. Contains the 7-bit slave address for operation of the I2C interface in slave mode, and is not used in master mode. The least significant bit determines whether a slave responds to the General Call address.

§data_buffer: DATA_BUFFER

0x2c - Data buffer register. The contents of the 8 MSBs of the I2DAT shift register will be transferred to the DATA_BUFFER automatically after every nine bits (8 bits of data plus ACK or NACK) has been received on the bus.

§mask: [MASK; 4]

0x30 - I2C Slave address mask register. This mask register is associated with I2ADR0 to determine an address match. The mask register has no effect when comparing to the General Call address (0000000).

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.