[En-Nut-Discussion] NutI2cMasterTransceive() versus NutI2cMasterTransact()

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Tue Feb 19 17:00:59 CET 2013


Hello,

looking again at NutI2cMasterTransceive(), I see two drawbacks:
- The information about bytes succesfully written and received is lost
- We copy a *wdat/wlen/*rdat/rsize around

I proposed that NutI2cMasterTransact() should get a list of NUTI2C_MSG
as argument. This saves the copy and gives the user access to the number of
bytes transferred. So the definition would be
int NutI2cMasterTransact(bus, NUTI2C_MSG*, len);

NutI2cMasterTransact() should return the number of full messages
successfully transceived or return -1 in case of error. Other ideas?

So I think we should drop NutI2cMasterTransceive() or mark it deprecated
as soon as we introduce NutI2cMasterTransact()

Bye

-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------


More information about the En-Nut-Discussion mailing list