Found 5 other functions taking a
i2c_operation_t
argument:
This function is used to send I2C read command, which is divided in three parts. -1. If read buffer is smaller than hardware fifo, it can be sent out in one single time, so the hardware command(step) is simply like start(1)->read_ack(2)->read_nack(3)->end(4) -2. If read buffer is larger than hardware fifo, it cannot be sent out in one time, so it needs to be separated in to different transactions by interrupt. In this time, the hardware command(step) simply looks like start(1)->read_part(2)--interrupt--...--read(1)->end(2). -3. If only one byte is waiting to be read. only send nack command. like start(1)->read_nack(2)->end(3)
This function is used to send I2C start or stop command, which is divided in two parts. If start command is accepted, a write address command must be followed. So prepared one address data here. Send with write or read command.
This function is used to send I2C write command, which is divided in two parts. -1. If write buffer is smaller than hardware fifo, it can be sent out in one single time, so the hardware command(step) is simply like start(1)->write(2)->end(3) -2. If write buffer is larger than hardware fifo, it cannot be sent out in one time, so it needs to be separated in to different transactions by interrupt. In this time, the hardware command(step) simply looks like start(1)->write_part(2)--interrupt--...--write(1)->end(2).