class::hal::I2CAttributes

class hal::I2CAttributes
  : public hal::PinAssignmentPeriphAttributes< i2c_attr_t, i2c_pin_assignment_t >

The I2C attribute class is used for configuring and storing I2C port settings.

See also: hal::I2CPinAssignment

See also: hal::I2C

Members

I2CAttributes()
mcu_pin_t scl() const
mcu_pin_t sda() const
I2CAttributes & set_flags(

u32 value
)

I2CAttributes & set_frequency(

u32 value
)

I2CAttributes & set_scl(

const mcu_pin_t & pin
)

I2CAttributes & set_scl(

u8 port,
u8 pin
)

I2CAttributes & set_sda(

const mcu_pin_t & pin
)

I2CAttributes & set_sda(

u8 port,
u8 pin
)

I2CAttributes & set_slave_addr(

u8 addr
)

I2CAttributes & set_slave_addr16(

u16 addr
)

u8 slave_addr() const
u8 slave_addr16() const

Details

I2CAttributes()

mcu_pin_t scl() const

Access the SCL pin assignment value.


mcu_pin_t sda() const

Accesses the SDA pin assignment value.


I2CAttributes & set_flags(

u32 value
)


I2CAttributes & set_frequency(

u32 value
)


I2CAttributes & set_scl(

const mcu_pin_t & pin
)

Sets the SCL pin assignment value.


I2CAttributes & set_scl(

u8 port,
u8 pin
)

Sets the SCL pin assignment value.


I2CAttributes & set_sda(

const mcu_pin_t & pin
)

Sets the SDA pin assignment value.


I2CAttributes & set_sda(

u8 port,
u8 pin
)

Sets the SDA pin assignment value.


I2CAttributes & set_slave_addr(

u8 addr
)

Sets the 7-bit slave address value.


I2CAttributes & set_slave_addr16(

u16 addr
)

Sets the 16-bit slave address value.


u8 slave_addr() const

Access the slave address value.


u8 slave_addr16() const

Accesses the 16-bit slave address value.


X

Thanks for Coming!

Subscribe to news and updates