16
µTasker general / Waiting for IIC to complete
« on: October 04, 2017, 09:58:25 AM »
Hi Mark
I have connected an IIC that requires initialization of few registers. But there must be a delay in between each call, see below. When the below is carried out, I assume it goes to a buffer where all is transmitted to the device. Is there a way I can poll a register to see if the 1st send is complete before continuing with the second?
Regards
Neil
unsigned char VAL[4];
VAL[0]=0x40;
VAL[1]=0;
VAL[2]=0x0; //set as output
fnWrite(IICPortIDG2, (unsigned char *)VAL, 3);
//has to be a delay here....
VAL[1]=9;
VAL[2]=0;
fnWrite(IICPortIDG2, (unsigned char *)VAL, 3);
I have connected an IIC that requires initialization of few registers. But there must be a delay in between each call, see below. When the below is carried out, I assume it goes to a buffer where all is transmitted to the device. Is there a way I can poll a register to see if the 1st send is complete before continuing with the second?
Regards
Neil
unsigned char VAL[4];
VAL[0]=0x40;
VAL[1]=0;
VAL[2]=0x0; //set as output
fnWrite(IICPortIDG2, (unsigned char *)VAL, 3);
//has to be a delay here....
VAL[1]=9;
VAL[2]=0;
fnWrite(IICPortIDG2, (unsigned char *)VAL, 3);