
/***************************************************************************
**
**    $Header:   
**
**    $Log:   
** 
** Initial revision.
**
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name:  Flsdown.H
//
//  Description:The header file for the class: CDownload
//
//  Author:     Jerry Yan
//
//  Date:       03/20/96
//
//  Modification:
//
//   
//
//  Copyright (C) 199 Microtek International. All rights reserved.
//
/////////////////////////////////////////////////////////////////////////////


#include "comm.h" 
#include "flspro.h"


struct hexrecord {
unsigned char   leth;   /*8 bit number of data bytes*/
unsigned char   adrh;   /*16 bit start address high 8 bit*/
unsigned char   adrl;   /*16 bit start address low 8 bit*/
unsigned char   rdata[300];     /*max data number is 0xff*/
unsigned char   rtype;
unsigned char   rsum;
};
                 
class CDownload 
{   
   public:
        unsigned int recordnum;  
		unsigned char m_uchMajor, m_uchMinor; 
		UINT m_puCPUId[64];       
        CFile  m_file ; //handle of the selected HEX file to download     
        CProStatus *m_pProStatus; 
        
   public:
        CDownload();  
        ~CDownload();
        BOOL Download();
            
        int CheckLegal( ); 
        void DrawProBar();    
        int  hex_sum(char* ,hexrecord* );  
        BOOL check_ver();
        BOOL GetFileSupportedCPUs(char*,char*,char*);
        
};     