require '_h2ph_pre.ph';

unless(defined(&HPT366_REV)) {
    sub HPT366_REV () {	0x01;}
}
unless(defined(&HPT370_REV)) {
    sub HPT370_REV () {	0x03;}
}
unless(defined(&HPT_IDETIM)) {
    sub HPT_IDETIM {
	local($chan, $drive) = @_;
	eval q((0x40 + (($drive) * 4) + (($chan) * 8)));
    }
}
unless(defined(&HPT_IDETIM_BUFEN)) {
    sub HPT_IDETIM_BUFEN () {	0x80000000;}
}
unless(defined(&HPT_IDETIM_MSTEN)) {
    sub HPT_IDETIM_MSTEN () {	0x40000000;}
}
unless(defined(&HPT_IDETIM_DMAEN)) {
    sub HPT_IDETIM_DMAEN () {	0x20000000;}
}
unless(defined(&HPT_IDETIM_UDMAEN)) {
    sub HPT_IDETIM_UDMAEN () {	0x10000000;}
}
unless(defined(&HPT366_CTRL1)) {
    sub HPT366_CTRL1 () {	0x50;}
}
unless(defined(&HPT366_CTRL1_BLKDIS)) {
    sub HPT366_CTRL1_BLKDIS {
	local($chan) = @_;
	eval q((0x40 << ($chan)));
    }
}
unless(defined(&HPT366_CTRL1_CHANEN)) {
    sub HPT366_CTRL1_CHANEN {
	local($chan) = @_;
	eval q((0x10 << ($chan)));
    }
}
unless(defined(&HPT366_CTRL1_CLRBUF)) {
    sub HPT366_CTRL1_CLRBUF {
	local($chan) = @_;
	eval q((0x04 << ($chan)));
    }
}
unless(defined(&HPT366_CTRL1_LEG)) {
    sub HPT366_CTRL1_LEG {
	local($chan) = @_;
	eval q((0x01 << ($chan)));
    }
}
unless(defined(&HPT366_CTRL2)) {
    sub HPT366_CTRL2 () {	0x51;}
}
unless(defined(&HPT366_CTRL2_FASTIRQ)) {
    sub HPT366_CTRL2_FASTIRQ () {	0x80;}
}
unless(defined(&HPT366_CTRL2_HOLDIRQ)) {
    sub HPT366_CTRL2_HOLDIRQ {
	local($chan) = @_;
	eval q((0x20 << ($chan)));
    }
}
unless(defined(&HPT366_CTRL2_SGEN)) {
    sub HPT366_CTRL2_SGEN () {	0x10;}
}
unless(defined(&HPT366_CTRL2_CLEARFIFO)) {
    sub HPT366_CTRL2_CLEARFIFO {
	local($chan) = @_;
	eval q((0x04 << ($chan)));
    }
}
unless(defined(&HPT366_CTRL2_CLEARBMSM)) {
    sub HPT366_CTRL2_CLEARBMSM () {	0x02;}
}
unless(defined(&HPT366_CTRL2_CLEARSG)) {
    sub HPT366_CTRL2_CLEARSG () {	0x01;}
}
unless(defined(&HPT366_CTRL3)) {
    sub HPT366_CTRL3 {
	local($chan) = @_;
	eval q((0x52 + (($chan) * 4)));
    }
}
unless(defined(&HPT366_CTRL3_PDMA)) {
    sub HPT366_CTRL3_PDMA () {	0x8000;}
}
unless(defined(&HPT366_CTRL3_BP)) {
    sub HPT366_CTRL3_BP () {	0x4000;}
}
unless(defined(&HPT366_CTRL3_FASTIRQ_OFFSET)) {
    sub HPT366_CTRL3_FASTIRQ_OFFSET () {	9;}
}
unless(defined(&HPT366_CTRL3_FASTIRQ_MASK)) {
    sub HPT366_CTRL3_FASTIRQ_MASK () {	0x3;}
}
unless(defined(&HPT370_CTRL1)) {
    sub HPT370_CTRL1 {
	local($chan) = @_;
	eval q((0x50 + (($chan) * 4)));
    }
}
unless(defined(&HPT370_CTRL1_CLRSG)) {
    sub HPT370_CTRL1_CLRSG () {	0x80;}
}
unless(defined(&HPT370_CTRL1_READF)) {
    sub HPT370_CTRL1_READF () {	0x40;}
}
unless(defined(&HPT370_CTRL1_CLRST)) {
    sub HPT370_CTRL1_CLRST () {	0x20;}
}
unless(defined(&HPT370_CTRL1_CLRSGC)) {
    sub HPT370_CTRL1_CLRSGC () {	0x10;}
}
unless(defined(&HPT370_CTRL1_BLKDIS)) {
    sub HPT370_CTRL1_BLKDIS () {	0x08;}
}
unless(defined(&HPT370_CTRL1_EN)) {
    sub HPT370_CTRL1_EN () {	0x04;}
}
unless(defined(&HPT370_CTRL1_CLRDBUF)) {
    sub HPT370_CTRL1_CLRDBUF () {	0x02;}
}
unless(defined(&HPT370_CTRL1_LEGEN)) {
    sub HPT370_CTRL1_LEGEN () {	0x01;}
}
unless(defined(&HPT370_CTRL2)) {
    sub HPT370_CTRL2 {
	local($chan) = @_;
	eval q((0x51 + (($chan) * 4)));
    }
}
unless(defined(&HPT370_CTRL2_FASTIRQ)) {
    sub HPT370_CTRL2_FASTIRQ () {	0x02;}
}
unless(defined(&HPT370_CTRL2_HIRQ)) {
    sub HPT370_CTRL2_HIRQ () {	0x01;}
}
unless(defined(&HPT370_CTRL3)) {
    sub HPT370_CTRL3 {
	local($chan) = @_;
	eval q((0x52 + (($chan) * 4)));
    }
}
unless(defined(&HPT370_CTRL3_HIZ)) {
    sub HPT370_CTRL3_HIZ () {	0x8000;}
}
unless(defined(&HPT370_CTRL3_BP)) {
    sub HPT370_CTRL3_BP () {	0x4000;}
}
unless(defined(&HPT370_CTRL3_FASTIRQ_OFFSET)) {
    sub HPT370_CTRL3_FASTIRQ_OFFSET () {	9;}
}
unless(defined(&HPT370_CTRL3_FASTIRQ_MASK)) {
    sub HPT370_CTRL3_FASTIRQ_MASK () {	0x3;}
}
unless(defined(&HPT_STAT1)) {
    sub HPT_STAT1 () {	0x58;}
}
unless(defined(&HPT_STAT1_IRQPOLL)) {
    sub HPT_STAT1_IRQPOLL {
	local($chan) = @_;
	eval q((0x40 << ($chan)));
    }
}
unless(defined(&HPT_STAT1_DMARQ)) {
    sub HPT_STAT1_DMARQ {
	local($chan) = @_;
	eval q((0x04 << (($chan) * 3)));
    }
}
unless(defined(&HPT_STAT1_DMACK)) {
    sub HPT_STAT1_DMACK {
	local($chan) = @_;
	eval q((0x02 << (($chan) * 3)));
    }
}
unless(defined(&HPT_STAT1_IORDY)) {
    sub HPT_STAT1_IORDY {
	local($chan) = @_;
	eval q((0x01 << (($chan) * 3)));
    }
}
unless(defined(&HPT_STAT2)) {
    sub HPT_STAT2 () {	0x59;}
}
unless(defined(&HPT_STAT2_FLT_RST)) {
    sub HPT_STAT2_FLT_RST () {	0x40;}
}
unless(defined(&HPT_STAT2_RST)) {
    sub HPT_STAT2_RST {
	local($chan) = @_;
	eval q((0x40 << ($chan)));
    }
}
unless(defined(&HPT_STAT2_POLLEN)) {
    sub HPT_STAT2_POLLEN {
	local($chan) = @_;
	eval q((0x04 << (($chan) * 3)));
    }
}
unless(defined(&HPT_STAT2_IRQD1)) {
    sub HPT_STAT2_IRQD1 {
	local($chan) = @_;
	eval q((0x02 << (($chan) * 3)));
    }
}
unless(defined(&HPT_STAT2_IRQD0_CH1)) {
    sub HPT_STAT2_IRQD0_CH1 () {	0x08;}
}
unless(defined(&HPT_STAT2_POLLST)) {
    sub HPT_STAT2_POLLST () {	0x01;}
}
unless(defined(&HPT_CSEL)) {
    sub HPT_CSEL () {	0x5a;}
}
unless(defined(&HPT_CSEL_IRQDIS)) {
    sub HPT_CSEL_IRQDIS () {	0x10;}
}
unless(defined(&HPT_CSEL_PCIDIS)) {
    sub HPT_CSEL_PCIDIS () {	0x08;}
}
unless(defined(&HPT_CSEL_PCIWR)) {
    sub HPT_CSEL_PCIWR () {	0x04;}
}
unless(defined(&HPT_CSEL_CBLID)) {
    sub HPT_CSEL_CBLID {
	local($chan) = @_;
	eval q((0x01 << (1- ($chan))));
    }
}
1;
