require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_STP4020_REG_H)) {
    eval 'sub _STP4020_REG_H () {1;}' unless defined(&_STP4020_REG_H);
    eval 'sub STP4020_NSOCK () {2;}' unless defined(&STP4020_NSOCK);
    eval 'sub STP4020_NWIN () {3;}' unless defined(&STP4020_NWIN);
    eval 'sub STP4020_ICR0_rsvd1 () {0xc000;}' unless defined(&STP4020_ICR0_rsvd1);
    eval 'sub STP4020_ICR0_PROMEN () {0x2000;}' unless defined(&STP4020_ICR0_PROMEN);
    eval 'sub STP4020_ICR0_SCILVL () {0x1000;}' unless defined(&STP4020_ICR0_SCILVL);
    eval 'sub STP4020_ICR0_SCILVL_SB0 () {0x;}' unless defined(&STP4020_ICR0_SCILVL_SB0);
    eval 'sub STP4020_ICR0_SCILVL_SB1 () {0x1000;}' unless defined(&STP4020_ICR0_SCILVL_SB1);
    eval 'sub STP4020_ICR0_CDIE () {0x800;}' unless defined(&STP4020_ICR0_CDIE);
    eval 'sub STP4020_ICR0_BVD2IE () {0x400;}' unless defined(&STP4020_ICR0_BVD2IE);
    eval 'sub STP4020_ICR0_BVD1IE () {0x200;}' unless defined(&STP4020_ICR0_BVD1IE);
    eval 'sub STP4020_ICR0_RDYIE () {0x100;}' unless defined(&STP4020_ICR0_RDYIE);
    eval 'sub STP4020_ICR0_WPIE () {0x80;}' unless defined(&STP4020_ICR0_WPIE);
    eval 'sub STP4020_ICR0_CTOIE () {0x40;}' unless defined(&STP4020_ICR0_CTOIE);
    eval 'sub STP4020_ICR0_rsvd2 () {0x20;}' unless defined(&STP4020_ICR0_rsvd2);
    eval 'sub STP4020_ICR0_IOIE () {0x10;}' unless defined(&STP4020_ICR0_IOIE);
    eval 'sub STP4020_ICR0_IOILVL () {0x8;}' unless defined(&STP4020_ICR0_IOILVL);
    eval 'sub STP4020_ICR0_IOILVL_SB0 () {0x;}' unless defined(&STP4020_ICR0_IOILVL_SB0);
    eval 'sub STP4020_ICR0_IOILVL_SB1 () {0x8;}' unless defined(&STP4020_ICR0_IOILVL_SB1);
    eval 'sub STP4020_ICR0_SPKREN () {0x4;}' unless defined(&STP4020_ICR0_SPKREN);
    eval 'sub STP4020_ICR0_RESET () {0x2;}' unless defined(&STP4020_ICR0_RESET);
    eval 'sub STP4020_ICR0_IFTYPE () {0x1;}' unless defined(&STP4020_ICR0_IFTYPE);
    eval 'sub STP4020_ICR0_IFTYPE_MEM () {0x;}' unless defined(&STP4020_ICR0_IFTYPE_MEM);
    eval 'sub STP4020_ICR0_IFTYPE_IO () {0x1;}' unless defined(&STP4020_ICR0_IFTYPE_IO);
    eval 'sub STP4020_ICR0_BITS () {"\\010\\1IFTYPE\\2RESET\\3SPKREN\\4IOILVL\\5IOIE" "\\7CTOIE\\10WPIE\\11RDYIE\\12BVD1IE\\13BVD2IE\\14CDIE\\15SCILV\\16PROMEN";}' unless defined(&STP4020_ICR0_BITS);
    eval 'sub STP4020_ICR0_ALL_STATUS_IE () {(  &STP4020_ICR0_CDIE |  &STP4020_ICR0_BVD2IE |  &STP4020_ICR0_BVD1IE |  &STP4020_ICR0_RDYIE |  &STP4020_ICR0_WPIE |  &STP4020_ICR0_CTOIE );}' unless defined(&STP4020_ICR0_ALL_STATUS_IE);
    eval 'sub STP4020_ICR1_LPBKEN () {0x8000;}' unless defined(&STP4020_ICR1_LPBKEN);
    eval 'sub STP4020_ICR1_CD1DB () {0x4000;}' unless defined(&STP4020_ICR1_CD1DB);
    eval 'sub STP4020_ICR1_BVD2DB () {0x2000;}' unless defined(&STP4020_ICR1_BVD2DB);
    eval 'sub STP4020_ICR1_BVD1DB () {0x1000;}' unless defined(&STP4020_ICR1_BVD1DB);
    eval 'sub STP4020_ICR1_RDYDB () {0x800;}' unless defined(&STP4020_ICR1_RDYDB);
    eval 'sub STP4020_ICR1_WPDB () {0x400;}' unless defined(&STP4020_ICR1_WPDB);
    eval 'sub STP4020_ICR1_WAITDB () {0x200;}' unless defined(&STP4020_ICR1_WAITDB);
    eval 'sub STP4020_ICR1_DIAGEN () {0x100;}' unless defined(&STP4020_ICR1_DIAGEN);
    eval 'sub STP4020_ICR1_rsvd1 () {0x80;}' unless defined(&STP4020_ICR1_rsvd1);
    eval 'sub STP4020_ICR1_APWREN () {0x40;}' unless defined(&STP4020_ICR1_APWREN);
    eval 'sub STP4020_ICR1_VPP2EN () {0x30;}' unless defined(&STP4020_ICR1_VPP2EN);
    eval 'sub STP4020_ICR1_VPP2_OFF () {0x;}' unless defined(&STP4020_ICR1_VPP2_OFF);
    eval 'sub STP4020_ICR1_VPP2_VCC () {0x10;}' unless defined(&STP4020_ICR1_VPP2_VCC);
    eval 'sub STP4020_ICR1_VPP2_VPP () {0x20;}' unless defined(&STP4020_ICR1_VPP2_VPP);
    eval 'sub STP4020_ICR1_VPP2_ZIP () {0x30;}' unless defined(&STP4020_ICR1_VPP2_ZIP);
    eval 'sub STP4020_ICR1_VPP1EN () {0xc;}' unless defined(&STP4020_ICR1_VPP1EN);
    eval 'sub STP4020_ICR1_VPP1_OFF () {0x;}' unless defined(&STP4020_ICR1_VPP1_OFF);
    eval 'sub STP4020_ICR1_VPP1_VCC () {0x4;}' unless defined(&STP4020_ICR1_VPP1_VCC);
    eval 'sub STP4020_ICR1_VPP1_VPP () {0x8;}' unless defined(&STP4020_ICR1_VPP1_VPP);
    eval 'sub STP4020_ICR1_VPP1_ZIP () {0xc;}' unless defined(&STP4020_ICR1_VPP1_ZIP);
    eval 'sub STP4020_ICR1_MSTPWR () {0x2;}' unless defined(&STP4020_ICR1_MSTPWR);
    eval 'sub STP4020_ICR1_PCIFOE () {0x1;}' unless defined(&STP4020_ICR1_PCIFOE);
    eval 'sub STP4020_ICR1_BITS () {"\\010\\1PCIFOE\\2MSTPWR\\7APWREN\\11DIAGEN" "\\12WAITDB\\13WPDB\\14RDYDB\\15BVD1D\\16BVD2D\\17CD1DB\\18LPBKEN";}' unless defined(&STP4020_ICR1_BITS);
    eval 'sub STP4020_ISR0_ZERO () {0x8000;}' unless defined(&STP4020_ISR0_ZERO);
    eval 'sub STP4020_ISR0_IOINT () {0x8000;}' unless defined(&STP4020_ISR0_IOINT);
    eval 'sub STP4020_ISR0_SCINT () {0x4000;}' unless defined(&STP4020_ISR0_SCINT);
    eval 'sub STP4020_ISR0_CDCHG () {0x2000;}' unless defined(&STP4020_ISR0_CDCHG);
    eval 'sub STP4020_ISR0_BVD2CHG () {0x1000;}' unless defined(&STP4020_ISR0_BVD2CHG);
    eval 'sub STP4020_ISR0_BVD1CHG () {0x800;}' unless defined(&STP4020_ISR0_BVD1CHG);
    eval 'sub STP4020_ISR0_RDYCHG () {0x400;}' unless defined(&STP4020_ISR0_RDYCHG);
    eval 'sub STP4020_ISR0_WPCHG () {0x200;}' unless defined(&STP4020_ISR0_WPCHG);
    eval 'sub STP4020_ISR0_PCTO () {0x100;}' unless defined(&STP4020_ISR0_PCTO);
    eval 'sub STP4020_ISR0_ALL_STATUS_IRQ () {0x7f00;}' unless defined(&STP4020_ISR0_ALL_STATUS_IRQ);
    eval 'sub STP4020_ISR0_LIVE () {0xff;}' unless defined(&STP4020_ISR0_LIVE);
    eval 'sub STP4020_ISR0_CD2ST () {0x80;}' unless defined(&STP4020_ISR0_CD2ST);
    eval 'sub STP4020_ISR0_CD1ST () {0x40;}' unless defined(&STP4020_ISR0_CD1ST);
    eval 'sub STP4020_ISR0_BVD2ST () {0x20;}' unless defined(&STP4020_ISR0_BVD2ST);
    eval 'sub STP4020_ISR0_SPKR () {0x20;}' unless defined(&STP4020_ISR0_SPKR);
    eval 'sub STP4020_ISR0_BVD1ST () {0x10;}' unless defined(&STP4020_ISR0_BVD1ST);
    eval 'sub STP4020_ISR0_STSCHG () {0x10;}' unless defined(&STP4020_ISR0_STSCHG);
    eval 'sub STP4020_ISR0_RDYST () {0x8;}' unless defined(&STP4020_ISR0_RDYST);
    eval 'sub STP4020_ISR0_IOREQ () {0x8;}' unless defined(&STP4020_ISR0_IOREQ);
    eval 'sub STP4020_ISR0_WPST () {0x4;}' unless defined(&STP4020_ISR0_WPST);
    eval 'sub STP4020_ISR0_IOIS16 () {0x4;}' unless defined(&STP4020_ISR0_IOIS16);
    eval 'sub STP4020_ISR0_WAITST () {0x2;}' unless defined(&STP4020_ISR0_WAITST);
    eval 'sub STP4020_ISR0_PWRON () {0x1;}' unless defined(&STP4020_ISR0_PWRON);
    eval 'sub STP4020_ISR0_IOBITS () {"\\010\\1PWRON\\2WAITST\\3IOIS16\\4IOREQ" "\\5STSCHG\\6SPKR\\7CD1ST\\10CD2ST\\11PCTO\\12WPCHG\\13RDYCHG\\14BVD1CHG" "\\15BVD2CHG\\16CDCHG\\17SCINT\\20IOINT";}' unless defined(&STP4020_ISR0_IOBITS);
    eval 'sub STP4020_ISR0_MOBITS () {"\\010\\1PWRON\\2WAITST\\3WPST\\4RDYST" "\\5BVD1ST\\6BVD2ST\\7CD1ST\\10CD2ST\\11PCTO\\12WPCHG\\13RDYCHG\\14BVD1CHG" "\\15BVD2CHG\\16CDCHG\\17SCINT";}' unless defined(&STP4020_ISR0_MOBITS);
    eval 'sub STP4020_ISR1_rsvd () {0xffc0;}' unless defined(&STP4020_ISR1_rsvd);
    eval 'sub STP4020_ISR1_PCTYPE_M () {0x30;}' unless defined(&STP4020_ISR1_PCTYPE_M);
    eval 'sub STP4020_ISR1_PCTYPE_S () {4;}' unless defined(&STP4020_ISR1_PCTYPE_S);
    eval 'sub STP4020_ISR1_REV_M () {0xf;}' unless defined(&STP4020_ISR1_REV_M);
    eval 'sub STP4020_ISR1_REV_S () {0;}' unless defined(&STP4020_ISR1_REV_S);
    eval 'sub STP4020_WINDOW_SIZE () {(1024*1024);}' unless defined(&STP4020_WINDOW_SIZE);
    eval 'sub STP4020_WINDOW_SHIFT () {20;}' unless defined(&STP4020_WINDOW_SHIFT);
    eval 'sub STP4020_WCR0_rsvd () {0x8000;}' unless defined(&STP4020_WCR0_rsvd);
    eval 'sub STP4020_WCR0_CMDLNG_M () {0x7c00;}' unless defined(&STP4020_WCR0_CMDLNG_M);
    eval 'sub STP4020_WCR0_CMDLNG_S () {10;}' unless defined(&STP4020_WCR0_CMDLNG_S);
    eval 'sub STP4020_WCR0_CMDDLY_M () {0x300;}' unless defined(&STP4020_WCR0_CMDDLY_M);
    eval 'sub STP4020_WCR0_CMDDLY_S () {8;}' unless defined(&STP4020_WCR0_CMDDLY_S);
    eval 'sub STP4020_MEM_SPEED_MIN () {100;}' unless defined(&STP4020_MEM_SPEED_MIN);
    eval 'sub STP4020_MEM_SPEED_MAX () {1370;}' unless defined(&STP4020_MEM_SPEED_MAX);
    eval 'sub STP4020_WCR0_ASPSEL_M () {0xc0;}' unless defined(&STP4020_WCR0_ASPSEL_M);
    eval 'sub STP4020_WCR0_ASPSEL_AM () {0x;}' unless defined(&STP4020_WCR0_ASPSEL_AM);
    eval 'sub STP4020_WCR0_ASPSEL_CM () {0x40;}' unless defined(&STP4020_WCR0_ASPSEL_CM);
    eval 'sub STP4020_WCR0_ASPSEL_IO () {0x80;}' unless defined(&STP4020_WCR0_ASPSEL_IO);
    eval 'sub STP4020_WCR0_BASE_M () {0x3f;}' unless defined(&STP4020_WCR0_BASE_M);
    eval 'sub STP4020_WCR0_BASE_S () {0;}' unless defined(&STP4020_WCR0_BASE_S);
    eval 'sub STP4020_ADDR2PAGE {
        my($x) = @_;
	    eval q((($x) >> 20));
    }' unless defined(&STP4020_ADDR2PAGE);
    eval 'sub STP4020_WCR1_rsvd () {0xffe0;}' unless defined(&STP4020_WCR1_rsvd);
    eval 'sub STP4020_WCR1_RECDLY_M () {0x18;}' unless defined(&STP4020_WCR1_RECDLY_M);
    eval 'sub STP4020_WCR1_RECDLY_S () {3;}' unless defined(&STP4020_WCR1_RECDLY_S);
    eval 'sub STP4020_WCR1_WAITDLY_M () {0x6;}' unless defined(&STP4020_WCR1_WAITDLY_M);
    eval 'sub STP4020_WCR1_WAITDLY_S () {1;}' unless defined(&STP4020_WCR1_WAITDLY_S);
    eval 'sub STP4020_WCR1_WAITREQ_M () {0x1;}' unless defined(&STP4020_WCR1_WAITREQ_M);
    eval 'sub STP4020_WCR1_WAITREQ_S () {0;}' unless defined(&STP4020_WCR1_WAITREQ_S);
    if((defined(&for_reference_only) ? &for_reference_only : 0)) {
    }
    eval 'sub STP4020_SOCKREGS_SIZE () {32;}' unless defined(&STP4020_SOCKREGS_SIZE);
    eval 'sub STP4020_WINREGS_SIZE () {4;}' unless defined(&STP4020_WINREGS_SIZE);
    eval 'sub STP4020_ICR0_IDX () {12;}' unless defined(&STP4020_ICR0_IDX);
    eval 'sub STP4020_ICR1_IDX () {14;}' unless defined(&STP4020_ICR1_IDX);
    eval 'sub STP4020_ISR0_IDX () {16;}' unless defined(&STP4020_ISR0_IDX);
    eval 'sub STP4020_ISR1_IDX () {18;}' unless defined(&STP4020_ISR1_IDX);
    eval 'sub STP4020_WCR0_IDX () {0;}' unless defined(&STP4020_WCR0_IDX);
    eval 'sub STP4020_WCR1_IDX () {2;}' unless defined(&STP4020_WCR1_IDX);
    eval 'sub STP4020_ICR0_REG {
        my($s) = @_;
	    eval q(((32* ($s)) +  &STP4020_ICR0_IDX));
    }' unless defined(&STP4020_ICR0_REG);
    eval 'sub STP4020_ICR1_REG {
        my($s) = @_;
	    eval q(((32* ($s)) +  &STP4020_ICR1_IDX));
    }' unless defined(&STP4020_ICR1_REG);
    eval 'sub STP4020_ISR0_REG {
        my($s) = @_;
	    eval q(((32* ($s)) +  &STP4020_ISR0_IDX));
    }' unless defined(&STP4020_ISR0_REG);
    eval 'sub STP4020_ISR1_REG {
        my($s) = @_;
	    eval q(((32* ($s)) +  &STP4020_ISR1_IDX));
    }' unless defined(&STP4020_ISR1_REG);
    eval 'sub STP4020_WCR0_REG {
        my($s,$w) = @_;
	    eval q(((32* ($s)) + (4* ($w)) +  &STP4020_WCR0_IDX));
    }' unless defined(&STP4020_WCR0_REG);
    eval 'sub STP4020_WCR1_REG {
        my($s,$w) = @_;
	    eval q(((32* ($s)) + (4* ($w)) +  &STP4020_WCR1_IDX));
    }' unless defined(&STP4020_WCR1_REG);
}
1;
