require '_h2ph_pre.ph';

unless(defined(&CY_CTRL)) {
    sub CY_CTRL () {	0x40;}
}
unless(defined(&CY_CTRL_RETRY)) {
    sub CY_CTRL_RETRY () {	0x00002000;}
}
unless(defined(&CY_CTRL_SLAVE_PREFETCH)) {
    sub CY_CTRL_SLAVE_PREFETCH () {	0x00000400;}
}
unless(defined(&CY_CTRL_POSTWRITE)) {
    sub CY_CTRL_POSTWRITE () {	0x00000200;}
}
unless(defined(&CY_CTRL_PREFETCH)) {
    sub CY_CTRL_PREFETCH {
	local($drive) = @_;
	eval q((0x00000100 << (2* ($drive))));
    }
}
unless(defined(&CY_CTRL_POSTWRITE_LENGTH_MASK)) {
    sub CY_CTRL_POSTWRITE_LENGTH_MASK () {	0x00000030;}
}
unless(defined(&CY_CTRL_POSTWRITE_LENGTH_OFF)) {
    sub CY_CTRL_POSTWRITE_LENGTH_OFF () {	4;}
}
unless(defined(&CY_CTRL_PREFETCH_LENGTH_MASK)) {
    sub CY_CTRL_PREFETCH_LENGTH_MASK () {	0x00000003;}
}
unless(defined(&CY_CTRL_PREFETCH_LENGTH_OFF)) {
    sub CY_CTRL_PREFETCH_LENGTH_OFF () {	0;}
}
unless(defined(&CY_ADDR_CTRL)) {
    sub CY_ADDR_CTRL () {	0x48;}
}
unless(defined(&CY_ADDR_CTRL_SETUP_OFF)) {
    sub CY_ADDR_CTRL_SETUP_OFF {
	local($drive) = @_;
	eval q((4* ($drive)));
    }
}
unless(defined(&CY_ADDR_CTRL_SETUP_MASK)) {
    sub CY_ADDR_CTRL_SETUP_MASK {
	local($drive) = @_;
	eval q((0x00000007 <<  &CY_ADDR_CTRL_SETUP_OFF($drive)));
    }
}
unless(defined(&CY_CMD_CTRL)) {
    sub CY_CMD_CTRL () {	0x4c;}
}
unless(defined(&CY_CMD_CTRL_IOW_PULSE_OFF)) {
    sub CY_CMD_CTRL_IOW_PULSE_OFF {
	local($drive) = @_;
	eval q((12+ 16* ($drive)));
    }
}
unless(defined(&CY_CMD_CTRL_IOW_REC_OFF)) {
    sub CY_CMD_CTRL_IOW_REC_OFF {
	local($drive) = @_;
	eval q((8+ 16* ($drive)));
    }
}
unless(defined(&CY_CMD_CTRL_IOR_PULSE_OFF)) {
    sub CY_CMD_CTRL_IOR_PULSE_OFF {
	local($drive) = @_;
	eval q((4+ 16* ($drive)));
    }
}
unless(defined(&CY_CMD_CTRL_IOR_REC_OFF)) {
    sub CY_CMD_CTRL_IOR_REC_OFF {
	local($drive) = @_;
	eval q((0+ 16* ($drive)));
    }
}
if(defined(&unused)) {
}
unless(defined(&CY_DMA_ADDR)) {
    sub CY_DMA_ADDR () {	0x22;}
}
unless(defined(&CY_DMA_SIZE)) {
    sub CY_DMA_SIZE () {	0x2;}
}
unless(defined(&CY_DMA_IDX)) {
    sub CY_DMA_IDX () {	0x00;}
}
unless(defined(&CY_DMA_IDX_PRIMARY)) {
    sub CY_DMA_IDX_PRIMARY () {	0x30;}
}
unless(defined(&CY_DMA_IDX_SECONDARY)) {
    sub CY_DMA_IDX_SECONDARY () {	0x31;}
}
unless(defined(&CY_DMA_IDX_TIMEOUT)) {
    sub CY_DMA_IDX_TIMEOUT () {	0x32;}
}
unless(defined(&CY_DMA_DATA)) {
    sub CY_DMA_DATA () {	0x01;}
}
unless(defined(&CY_DMA_DATA_MODE_MASK)) {
    sub CY_DMA_DATA_MODE_MASK () {	0x03;}
}
unless(defined(&CY_DMA_DATA_SINGLE)) {
    sub CY_DMA_DATA_SINGLE () {	0x04;}
}
1;
