require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_ESPREG_H_)) {
    eval 'sub _ESPREG_H_ () {1;}' unless defined(&_ESPREG_H_);
    eval 'sub ESP_CMD1 () {4;}' unless defined(&ESP_CMD1);
    eval 'sub ESP_CMD2 () {5;}' unless defined(&ESP_CMD2);
    eval 'sub ESP_STATUS1 () { &ESP_CMD1;}' unless defined(&ESP_STATUS1);
    eval 'sub ESP_STATUS2 () { &ESP_CMD2;}' unless defined(&ESP_STATUS2);
    eval 'sub ESP_GETTEST () {0x1;}' unless defined(&ESP_GETTEST);
    eval 'sub ESP_GETDIPS () {0x2;}' unless defined(&ESP_GETDIPS);
    eval 'sub ESP_SETFLOWTYPE () {0x8;}' unless defined(&ESP_SETFLOWTYPE);
    eval 'sub ESP_SETRXFLOW () {0xa;}' unless defined(&ESP_SETRXFLOW);
    eval 'sub ESP_SETMODE () {0x10;}' unless defined(&ESP_SETMODE);
    eval 'sub ESP_MODE_FIFO () {0x2;}' unless defined(&ESP_MODE_FIFO);
    eval 'sub ESP_MODE_RTS () {0x4;}' unless defined(&ESP_MODE_RTS);
    eval 'sub ESP_MODE_SCALE () {0x80;}' unless defined(&ESP_MODE_SCALE);
    eval 'sub ESP_FLOW_RTS () {0x4;}' unless defined(&ESP_FLOW_RTS);
    eval 'sub ESP_FLOW_CTS () {0x10;}' unless defined(&ESP_FLOW_CTS);
    eval 'sub RXHIGHWATER () {768;}' unless defined(&RXHIGHWATER);
    eval 'sub RXLOWWATER () {512;}' unless defined(&RXLOWWATER);
    eval 'sub HIBYTE {
        my($w) = @_;
	    eval q(((($w) >> 8) & 0xff));
    }' unless defined(&HIBYTE);
    eval 'sub LOBYTE {
        my($w) = @_;
	    eval q((($w) & 0xff));
    }' unless defined(&LOBYTE);
}
1;
