#define DWNLD_MAG1_SIZE_LOC 0x02
#define DWNLD_MAG1_PS_HDR_LOC 0x03
-#pragma pack (push, pack_save, 1)
-typedef struct _DSP_FILE_HDR {
- long build_date;
- long dsp_coff_date;
- long loader_code_address;
- long loader_code_size;
- long loader_code_end;
- long dsp_code_address;
- long dsp_code_size;
- long dsp_code_end;
- long reserved[8];
-} DSP_FILE_HDR, *PDSP_FILE_HDR;
-
-typedef struct _DSP_FILE_HDR_5 {
+struct dsp_file_hdr {
long version_id; // Version ID of this image format.
long package_id; // Package ID of code release.
long build_date; // Date/time stamp when file was built.
long version_data_offset; // Offset were scrambled version data begins.
long version_data_size; // Size, in words, of scrambled version data.
long nDspImages; // Number of DSP images in file.
-} DSP_FILE_HDR_5, * PDSP_FILE_HDR_5;
+};
-typedef struct _DSP_IMAGE_INFO {
- long coff_date; // Date/time when DSP Coff image was built.
- long begin_offset; // Offset in file where image begins.
- long end_offset; // Offset in file where image begins.
- long run_address; // On chip Start address of DSP code.
- long image_size; // Size of image.
- long version; // Embedded version # of DSP code.
-} DSP_IMAGE_INFO, *PDSP_IMAGE_INFO;
-
-typedef struct _DSP_IMAGE_INFO_V6 {
+#pragma pack(1)
+struct dsp_image_info {
long coff_date; // Date/time when DSP Coff image was built.
long begin_offset; // Offset in file where image begins.
long end_offset; // Offset in file where image begins.
long version; // Embedded version # of DSP code.
unsigned short checksum; // DSP File checksum
unsigned short pad1;
-} DSP_IMAGE_INFO_V6, *PDSP_IMAGE_INFO_V6;
+};
+
//---------------------------------------------------------------------------
// Function: check_usb_db
PPSEUDO_HDR pHdr;
USHORT usHdrLength;
//PPROV_RECORD pProvRecord;
- PDSP_FILE_HDR pFileHdr;
long word_length;
USHORT request;
USHORT temp;
USHORT tempword;
- PDSP_FILE_HDR_5 pFileHdr5;
- PDSP_IMAGE_INFO_V6 pDspImageInfoV6 = NULL;
+ struct dsp_file_hdr *pFileHdr5;
+ struct dsp_image_info *pDspImageInfoV6 = NULL;
long requested_version;
BOOLEAN bGoodVersion;
PDRVMSG pMailBoxData;
uiState = STATE_START_DWNLD;
- pFileHdr = (PDSP_FILE_HDR)pFileStart;
- pFileHdr5 = (PDSP_FILE_HDR_5)pFileStart;
+ pFileHdr5 = (struct dsp_file_hdr *)pFileStart;
ft1000_write_register (ft1000dev, 0x800, FT1000_REG_MAG_WATERMARK);
bGoodVersion = FALSE;
requested_version = get_request_value(ft1000dev);
- pDspImageInfoV6 = (PDSP_IMAGE_INFO_V6)(pFileStart + sizeof(DSP_FILE_HDR_5));
+ pDspImageInfoV6 = (struct dsp_image_info *)(pFileStart + sizeof(struct dsp_file_hdr ));
for (imageN = 0; imageN < pFileHdr5->nDspImages; imageN++)
{