
/***************************************************************************
**
** File name : daddll.h
** Author:John Zhou
** Description:
**    definition of data struct and prototype of interface function.
**
**
**    Finished date: 1995.10
**
**
**    Copyright (C) 1995 Microtek International, Inc.
**    All Rights Reserved
**
****************************************************************************/
#ifndef _DADDLL_
#define _DADDLL_

#include "windows.h"
    //CM_H REFERS TO HIGH 32 BITS OF CPU MODULE ID
    //CM_L REFERS TO LOW 32 BITS OF CPU MODULE ID
    //THIS IS BECAUSE OF THERE IS NO 64 BITS VALUE TYPE IN C++
    //I AM FOOLED BY ERIC AND FRANK.... SO STUPID 95.8
    #define     C_H_M31      0x00000000
    #define     C_H_M51      0X00000000
    #define     C_H_M32      0x00000000
    #define     C_H_M52      0X00000000

    #define     C_H_M154     0x00000000
    #define     C_H_M85154   0x00000000 //not support
    #define     C_H_M8344    0x00000000
    #define     C_H_M44      0x00000000

    #define     C_H_M152A    0x00000000
    #define     C_H_M83152A  0x00000000//NOT SUPPORT==152x
    #define     C_H_M152B    0x00000000
    #define     C_H_M83152B  0x00000000//NOT SUPPORT==152x

    #define     C_H_M152C    0x00000000//NOT SUPPORT==152x
    #define     C_H_M83152C  0X00000000//NOT SUPPORT==152x
    #define     C_H_M152D    0X00000000//NOT SUPPORT==152x
    #define     C_H_M83152D  0X00000000//NOT SUPPORT==152x

    #define     C_H_M51FA    0x00000000
    #define     C_H_M8351FA  0X00000000
    #define     C_H_M552     0x00000000
    #define     C_H_M83C552  0X00000000

    #define     C_H_M562     0X00000000
    #define     C_H_M83C562  0X00000000
    #define     C_H_M752     0X00000000
    #define     C_H_M83C752  0X00000000

    #define     C_H_M80C652  0X00000000
    #define     C_H_M83C652  0X00000000
    #define     C_H_M528     0X00000000
    #define     C_H_M83C528  0X00000000

    #define     C_H_M80C550  0X00000000
    #define     C_H_M83C550  0X00000000
    #define     C_H_M80C575  0X00000000//NOT SUPPORT
    #define     C_H_M83C575  0X00000000//NOT SUPPORT

    #define     C_H_M80C592  0X00000001//NOT SUPPORT
    #define     C_H_M83C592  0X00000002//NOT SUPPORT
    #define     C_H_M80CL31  0X00000004
    #define     C_H_M80CL51  0X00000008

    #define     C_H_M80C451  0x00000010//not support
    #define     C_H_M83C451  0X00000020//NOT SUPPORT
    #define     C_H_M750     0X00000040
    #define     C_H_M83C750  0X00000080

    #define     C_H_M751     0X00000100
    #define     C_H_M83C751  0X00000200
    #define     C_H_M80CL410 0X00000400
    #define     C_H_M83CL410 0X00000800

    #define     C_H_M80CL781 0X00001000//NOT SUPPORT
    #define     C_H_M83CL781 0X00002000
    #define     C_H_M80CL782 0X00004000//NOT SUPPORT
    #define     C_H_M83CL782 0X00008000

    #define     C_H_M80CL580 0X00010000
    #define     C_H_M83CL580 0X00020000
    #define     C_H_M320     0X00040000
    #define     C_H_M80C738     0X00200000
    #define     C_H_M89C738     0X00400000
    #define     C_H_M80C739     0X00800000
    #define     C_H_M89C739     0X01000000
    #define     C_H_M80C323     0X02000000
    #define     C_H_M83C323     0X04000000

// modify for 80931AX, 83931AX, 80931HX, 83931HX
	#define		C_H_M80931AX	0X10000000
	#define		C_H_M83931AX	0X20000000
	#define		C_H_M80931HX	0X40000000
	#define		C_H_M83931HX	0X80000000
	
    
    //LOW PART
    #define     C_L_M31      0x00000001
    #define     C_L_M51      0X00000002
    #define     C_L_M32      0x00000004
    #define     C_L_M52      0X00000008

    #define     C_L_M154     0x00000010
    #define     C_L_M85154   0x00000020 //not support
    #define     C_L_M8344    0x00000040
    #define     C_L_M44      0x00000080

    #define     C_L_M152A    0x00000100
    #define     C_L_M83152A  0x00000200 //not useful==152x
    #define     C_L_M152B    0x00000400
    #define     C_L_M83152B  0x00000800 //not useful==152x

    #define     C_L_M152C    0x00001000 //not useful==152x
    #define     C_L_M83152C  0X00002000 //not useful==152x
    #define     C_L_M152D    0X00004000 //not useful==152x
    #define     C_L_M83152D  0X00008000 //not useful==152x

    #define     C_L_M51FA    0x00010000
    #define     C_L_M8351FA  0X00020000
    #define     C_L_M552     0x00040000
    #define     C_L_M83C552  0X00080000

    #define     C_L_M562     0X00100000
    #define     C_L_M83C562  0X00200000
    #define     C_L_M752     0X00400000
    #define     C_L_M83C752  0X00800000

    #define     C_L_M80C652  0X01000000
    #define     C_L_M83C652  0X02000000
    #define     C_L_M528     0X04000000
    #define     C_L_M83C528  0X08000000

    #define     C_L_M80C550  0X10000000
    #define     C_L_M83C550  0X20000000
    #define     C_L_M80C575  0X40000000//NOT SUPPORT
    #define     C_L_M83C575  0X80000000//NOT SUPPORT

    #define     C_L_M80C592  0X00000000//NOT SUPPORT
    #define     C_L_M83C592  0X00000000//NOT SUPPORT
    #define     C_L_M80CL31  0X00000000
    #define     C_L_M80CL51  0X00000000

    #define     C_L_M80C451  0x00000000//not support
    #define     C_L_M83C451  0X00000000//NOT SUPPORT
    #define     C_L_M750     0X00000000//NOT DO       DD
    #define     C_L_M83C750  0X00000000//NOT DO       DD

    #define     C_L_M751     0X00000000//NOT DO       DD
    #define     C_L_M83C751  0X00000000//NOT DO       DD
    #define     C_L_M80CL410 0X00000000
    #define     C_L_M83CL410 0X00000000

    #define     C_L_M80CL781 0X00000000//NOT SUPPORT
    #define     C_L_M83CL781 0X00000000
    #define     C_L_M80CL782 0X00000000//NOT SUPPORT
    #define     C_L_M83CL782 0X00000000

    #define     C_L_M80CL580 0X00000000
    #define     C_L_M83CL580 0X00000000
    #define     C_L_M320     0X00000000
    #define     C_L_M80C738     0X00000000
    #define     C_L_M89C738     0X00000000
    #define     C_L_M80C739     0X00000000
    #define     C_L_M89C739     0X00000000
    #define     C_L_M80C323     0X00000000
    #define     C_L_M83C323     0X00000000

// modify for 80931AX, 83931AX, 80931HX, 83931HX
	#define		C_L_M80931AX	0X00000000
	#define		C_L_M83931AX	0X00000000
	#define		C_L_M80931HX	0X00000000
	#define		C_L_M83931HX	0X00000000


    #define BITABLE 1;
    #define UNBITABE 0;

    typedef struct
       {
        unsigned char *Name;
        unsigned char DirAddr;
        unsigned char SfrAttr;  // BITABLE: bitable  UNBITABE:unbitable.
        unsigned long  AvailableCPU_H;
        unsigned long  AvailableCPU_L;
        }SFRNAME;

typedef int           STATUS;
typedef unsigned char FLAG;



int WINAPI _export GetByteSFRSymbolIndex(unsigned char Addr,
                                         SFRNAME *SFRbitRet,
                                         unsigned long Module_H,
                                         unsigned long Module_L);
int WINAPI _export GetBitSFRSymbolIndex(unsigned char Addr,
                                        SFRNAME *SFRbitRet,
                                        unsigned long Module_H,
                                        unsigned long Module_L);
int WINAPI _export GetByteSFRAddrIndex(unsigned char *SFRNameBuf,
                                       SFRNAME *SFRbitRet,
                                       unsigned long Module_H,
                                       unsigned long Module_L);
int WINAPI _export GetBitSFRAddrIndex(unsigned char *SFRNameBuf,
                                      SFRNAME *SFRbitRet,
                                      unsigned long Module_H,
                                      unsigned long Module_L);


#endif

/*************************end of file ***************************/