I am looking pseudo code to check ACK or NAK and generate ACK or NAK in i2c communication
![upload_2019-10-12_11-33-17.png]()
as given in diagram The master issues Start, then sends the slave address and slave sends a single ACK or NAKa after receiving 8 bits

as given in diagram The master issues Start, then sends the slave address and slave sends a single ACK or NAKa after receiving 8 bits
Code:
void main (void)
{
//How to write a pseudo code to check ACK or NAK and to generate ACK or NAK
}