Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!



int read_from_eeprom(struct eeprom *e, productBoardInfo *pBoardInfo)
int ch, i;
int addr = 0;
char *p = NULL;
/* productBoardInfo 是你期望的資料結構 */
char ReadBuffer[sizeof(productBoardInfo)];

/* 從硬體元件讀出資料, size為資料結構的大小 */
for (i=0; i 0x7E) )
*(p+i) = 0x20;

/* 透過memcpy將讀出來的資料給你期望資料結構的指標pBoardInfo */
memcpy(pBoardInfo, &ReadBuffer[0], sizeof(productBoardInfo));

return 0;