I2C
Twi represents a struct containing registers for TWI.
#
Function DefinitionSets DDRC to write direction.
Sets DDRC to write direction.
#
Trait implementationnew
for Twi
#
Impl Returns pointer to TWBR.
wait_to_complete
for Twi
#
Impl Waits for the process to be complete.
Returns if process was successful.
init
for Twi
#
Impl Initiates the Twi bus.
start
for Twi
#
Impl Sends a start signal.
rep_start
for Twi
#
Impl Sends a Repeat Start Signal
stop for
Twi`#
Impl Stops the Twi bus.
set_address
for Twi
#
Impl Sets address of Slave.
Returns true if process is successful
address_read
for Twi
#
Impl Checks if slave is acknowledged.
Returns true if process is successful
write
for Twi
#
Impl Writes one byte of data to the Slave. Need to set address first.
Returns true if process is successful
write_burst
for Twi
#
Impl Writes consecutive bytes of data to the Slave. Need to set address first.
Returns number of bytes written
write_to_slave
for Twi
#
Impl Writes consecutive Data bytes to slave.
Returns true if process is completed and aborts if any of the steps.
start
for Twi
#
Impl Reads consecutive Data bytes from slave.
Returns true if process is completed and aborts if any of the steps.