Skip to main content

address

Function address 

Source
pub fn address(a1: AddressPin, a0: AddressPin) -> u8
Expand description

Returns the 7-bit I2C address selected by the A1 and A0 pins.

The address is 1 0 0 A1 A0 where each pin contributes two bits in the order GND, VS, SDA, SCL, giving the sixteen addresses 0x40 through 0x4F.

§Arguments

  • a1 - what the A1 pin is tied to.
  • a0 - what the A0 pin is tied to.

§Returns

The 7-bit target address, before the read/write bit is appended.