[an error occurred while processing this directive] [an error occurred while processing this directive]
А зачем так сложно?
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)
[an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]

Отправлено DmitryN 10 декабря 2001 г. 14:21
В ответ на: М-да... отправлено AndyBig 10 декабря 2001 г. 14:03

BytsPerSec = (BPB_BytsPerSec[1]<<8)|BPB_BytsPerSec[0] ??
может
BytsPerSec = *((unsigned int*)&BPB_BytsPerSec[0]);

И таким макаром...

Заменить описание структуры на определения смещения полей в массиве

#define BPB_BytsPerSec_OFFS 11
#define BPB_SecPerClus_OFFS 13

...

BytsPerSec = *((unsigned int*)&sbuf[BPB_BytsPerSec_OFFS]);
SecPerClus = *((unsigned char*)&sbuf[BPB_SecPerClus_OFFS]);
...


Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru