Re: SERIAL_PACKET_HEADER by Alli
Alli
Wed Apr 23 00:52:28 PDT 2008
hi,
i want to write a desktop tool for transfering file to ce device.
Thanks
"Luca Calligaris" <anonymous@discussions.microsoft.com> wrote in message
news:%2348LNKQpIHA.2292@TK2MSFTNGP03.phx.gbl...
> Why do you talk about a custom loader? If you care about
> SERIAL_PACKET_HEADER you are trying to
> use KITL over (USB) serial and you will probably download a .bin file
> instead of .nb0. Anyway you do
> not need to care about SERIAL_PACKET_HEADER: your bootloader must only
> provide some
> primitive functions to read/write raw data i.e.
>
> BOOL OEMSerialSendRaw(LPBYTE pbFrame, USHORT cbFrame);
> BOOL OEMSerialRecvRaw(LPBYTE pbFrame, PUSHORT pcbFrame, BOOLEAN
> bWaitInfinite);
>
> If you are interested in how SERIAL_PACKET_HEADER is used take a look at
> %_WINCEROOT%\PLATFORM\COMMON\SRC\COMMON\BOOT\BLSERIAL\serfuncs.cpp
>
> --
>
> Luca Calligaris
> www.eurotech.it
>
> "Alli Dem" <Alli.dem@gmail.com> ha scritto nel messaggio
> news:e5KjFoLpIHA.3960@TK2MSFTNGP02.phx.gbl...
>> Hi,
>> i am trying to write a custom nb0 image loader for pxa with serial usb.
>> i can get and send ACK and handshake with device.
>> but i couldn't understand how to use SERIAL_PACKET_HEADER.
>>
>> typedef struct tagSERIAL_PACKET_HEADER
>> {
>> UCHAR headerSig[HEADER_SIG_BYTES]; //kITL
>> UCHAR pktType; //0xCC
>> UCHAR Reserved; //0x00
>> USHORT payloadSize; //not including this header // is this the
>> length of data to sent after sending this header?
>> UCHAR crcData; // is this block count ?
>> UCHAR crcHdr; //chksum
>>
>> } SERIAL_PACKET_HEADER, *PSERIAL_PACKET_HEADER;
>>
>>
>> Thanks
>>
>>
>
>