
#define    false                        0
#define    true                         1

#ifdef     outportb
#undef     outportb
#endif
#ifdef     inportb
#undef     inportb
#endif
#ifdef     outp
#undef     outp
#endif
#ifdef     inp
#undef     inp
#endif
#ifdef     enable
#undef     enable
#endif
#ifdef     disable
#undef     disable
#endif


#define    inport1                 0x379
#define    outport1                0x378
#define    inport2                 0x279
#define    outport2                0x278
#define    inport3                 0x3BD
#define    outport3                0x3BC

#define    ABORT                      -3
#define    UNKNOWN                    -2
#define    OUT_OF_MEMORY              -1
#define    NUL                         0

#define    OK                          0
#define    INVALID_CHIP               -4
#define    CABLE_NOT_FOUND            -5
#define    POWER_OFF                  -6
#define    CHIPS_NOT_FOUND            -7
#define    FILE_NOT_FOUND             -8
#define    FILE_NOT_VALID             -9
#define    FILE_TOO_BIG              -10
#define    VALIDATION_ERROR          -11
#define    NO_VERIFY_SEC_FUSE_SET    -12
#define    NON_ISP_PART              -13
#define    UNKNOWN_FUNCTION          -14
#define    TOO_MANY_CHIPS            -15
#define    UNKNOWN_CHIP              -16
#define    FILE_NOT_JEDEC            -17
#define    FILE_ERROR                -18
#define    FILE_UES_INVALID          -19

#define    out_SDI                     1    /* weight of output signal lines  */
#define    out_SCLK                    2
#define    out_MODE                    4
#define    out_ISP                     8
#define    out_RESET                  16
#define    out_SENSE_CABLE_OUT        64

#define    in_VCC_OK                   8    /* weight of  input signal lines  */
#define    in_CABLE_SENSE_IN          32
#define    in_SDO                     64
