01-05-2021 01:17 PM - edited 01-05-2021 01:23 PM
I want to write date to iic's register. I think polled mode in master mode.
I read the polled master example, It uses function:
Status = XIicPs_MasterSendPolled(&Iic, SendBuffer,
Where does it send which register in iic device. eg 0x06
IIC_SLAVE_ADDR is device's address, SendBuffer is the data buffer, TEST_BUFFER_SIZE is the count sent,
It should have a send one byte function which include parameters regNo, databyte, IIC_SLAVE_ADDR
how to make it?
01-05-2021 03:12 PM - edited 01-05-2021 03:19 PM
It seems that XIicPs_MasterSendPolled always write ount bytes data begin with 0x00 register.
Is that right?
I hope the iic's fifo is register's address and data
01-05-2021 04:34 PM
To the IIC bus, the register number is just another byte of data. IIC doesn't actually have any native concept of registers -- it's just a stream of bytes. So, what you have is a two-byte write. Set SendBuffer to your register number, SendBuffer to your data, and write 2 bytes.