require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_ONEWIRE_ONEWIREREG_H_)) {
    eval 'sub _DEV_ONEWIRE_ONEWIREREG_H_ () {1;}' unless defined(&_DEV_ONEWIRE_ONEWIREREG_H_);
    eval 'sub ONEWIRE_ROM_FAMILY {
        my($x) = @_;
	    eval q((($x) & 0xff));
    }' unless defined(&ONEWIRE_ROM_FAMILY);
    eval 'sub ONEWIRE_ROM_FAMILY_TYPE {
        my($x) = @_;
	    eval q((($x) & 0x7f));
    }' unless defined(&ONEWIRE_ROM_FAMILY_TYPE);
    eval 'sub ONEWIRE_ROM_FAMILY_CUSTOM {
        my($x) = @_;
	    eval q(((($x) >> 7) & 0x1));
    }' unless defined(&ONEWIRE_ROM_FAMILY_CUSTOM);
    eval 'sub ONEWIRE_ROM_SN {
        my($x) = @_;
	    eval q(((($x) >> 8) & 281474976710655));
    }' unless defined(&ONEWIRE_ROM_SN);
    eval 'sub ONEWIRE_ROM_CRC {
        my($x) = @_;
	    eval q(((($x) >> 56) & 0xff));
    }' unless defined(&ONEWIRE_ROM_CRC);
    eval 'sub ONEWIRE_CMD_READ_ROM () {0x33;}' unless defined(&ONEWIRE_CMD_READ_ROM);
    eval 'sub ONEWIRE_CMD_SKIP_ROM () {0xcc;}' unless defined(&ONEWIRE_CMD_SKIP_ROM);
    eval 'sub ONEWIRE_CMD_MATCH_ROM () {0x55;}' unless defined(&ONEWIRE_CMD_MATCH_ROM);
    eval 'sub ONEWIRE_CMD_SEARCH_ROM () {0xf0;}' unless defined(&ONEWIRE_CMD_SEARCH_ROM);
    eval 'sub ONEWIRE_CMD_OVERDRIVE_SKIP_ROM () {0x3c;}' unless defined(&ONEWIRE_CMD_OVERDRIVE_SKIP_ROM);
    eval 'sub ONEWIRE_CMD_OVERDRIVE_MATCH_ROM () {0x69;}' unless defined(&ONEWIRE_CMD_OVERDRIVE_MATCH_ROM);
    eval 'sub ONEWIRE_CMD_READ_SCRATCHPAD () {0xaa;}' unless defined(&ONEWIRE_CMD_READ_SCRATCHPAD);
    eval 'sub ONEWIRE_CMD_WRITE_SCRATCHPAD () {0xf;}' unless defined(&ONEWIRE_CMD_WRITE_SCRATCHPAD);
    eval 'sub ONEWIRE_CMD_COPY_SCRATCHPAD () {0x55;}' unless defined(&ONEWIRE_CMD_COPY_SCRATCHPAD);
    eval 'sub ONEWIRE_CMD_READ_MEMORY () {0xf0;}' unless defined(&ONEWIRE_CMD_READ_MEMORY);
    eval 'sub ONEWIRE_CMD_WRITE_MEMORY () {0xf;}' unless defined(&ONEWIRE_CMD_WRITE_MEMORY);
    eval 'sub ONEWIRE_CMD_EXT_READ_MEMORY () {0xa5;}' unless defined(&ONEWIRE_CMD_EXT_READ_MEMORY);
    eval 'sub ONEWIRE_CMD_READ_SUBKEY () {0x66;}' unless defined(&ONEWIRE_CMD_READ_SUBKEY);
    eval 'sub ONEWIRE_CMD_WRITE_SUBKEY () {0x99;}' unless defined(&ONEWIRE_CMD_WRITE_SUBKEY);
    eval 'sub ONEWIRE_CMD_WRITE_PASSWORD () {0x5a;}' unless defined(&ONEWIRE_CMD_WRITE_PASSWORD);
    eval 'sub ONEWIRE_CMD_READ_STATUS () {0xaa;}' unless defined(&ONEWIRE_CMD_READ_STATUS);
    eval 'sub ONEWIRE_CMD_WRITE_STATUS () {0x55;}' unless defined(&ONEWIRE_CMD_WRITE_STATUS);
}
1;
