- on Do 13 August 2015
different setting !
gpGPIO_regs->BANK_REGISTERS[0].SET_DATA = (1<<12); // send address 10
gpGPIO_regs->BANK_REGISTERS[0].CLR_DATA = (1<<11);
gpGPIO_regs->BANK_REGISTERS[0].SET_DATA = (1<<14); // send address 10
this is different with just
gpGPIO_regs->BANK_REGISTERS[0].OUT_DATA = 0x00005000
actually i just want to to set both 12th and 14th bit to 1,and clear 11th bit.
at first look, the function is the same! but actually it may cause problems for my communication protocol! like, if i want to
Read_ADC_All();
Send_Data(1,2,3,4,5,6,7,8);
the state is wrong, it will not execute the send_Date function, but execute another Read_ADC()function.
because as i have tested, the second code will set the Set the 14th bit first and then for the 12th and 11th, it may execute from high bit to low bit (LSB)!
so it is recommanded to use the first one!
the right results: