Hello, i have this code :
s.BytesAvailableFcnMode = 'byte'; s.BytesAvailableFcnCount = 1; s.BytesAvailableFcn = {@mycallback,handles}; function mycallback(obj,event,handles) global s; data1 = fread(s,1); //read 1 byte end
The question's "when i use 2 times putc, how can i read 2 bytes at the same time, one for data1 and one for data2 ???"
Best Answer