struct datastruct{ unsigned short header; unsigned short status[5]; unsigned short temp[8]; unsigned short DAC1[8]; unsigned short DAC2[8]; unsigned short regist[6]; unsigned short time[8]; unsigned short n_tr; unsigned short hitmap_tr[16]; unsigned short curve1[4096]; unsigned short curve2[4096]; unsigned short iCRC; unsigned short tail; unsigned short CRC; }; struct datastruct calibdata; //pointer to struct struct datastruct *calibpointer; int fd,i,j,err,found; unsigned short buffer[10000]; unsigned short tmp1,tmp2;