require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_RTREG_H_)) {
    eval 'sub _RTREG_H_ () {1;}' unless defined(&_RTREG_H_);
    require 'dev/isa/rtvar.ph';
    eval 'sub RF_25K () {25;}' unless defined(&RF_25K);
    eval 'sub RF_50K () {50;}' unless defined(&RF_50K);
    eval 'sub RF_100K () {100;}' unless defined(&RF_100K);
    eval 'sub MAX_VOL () {5;}' unless defined(&MAX_VOL);
    eval 'sub VOLUME_RATIO {
        my($x) = @_;
	    eval q((255* $x /  &MAX_VOL));
    }' unless defined(&VOLUME_RATIO);
    eval 'sub RT_BASE_VALID {
        my($x) = @_;
	    eval q((($x == 0x20c) || ($x == 0x30c)));
    }' unless defined(&RT_BASE_VALID);
    eval 'sub CARD_RADIOTRACK () {0;}' unless defined(&CARD_RADIOTRACK);
    eval 'sub CARD_SF16FMI () {1;}' unless defined(&CARD_SF16FMI);
    eval 'sub CARD_UNKNOWN () {-1;}' unless defined(&CARD_UNKNOWN);
    eval 'sub RTRACK_CAPABILITIES () { &RADIO_CAPS_DETECT_STEREO |  &RADIO_CAPS_DETECT_SIGNAL |  &RADIO_CAPS_SET_MONO |  &RADIO_CAPS_REFERENCE_FREQ;}' unless defined(&RTRACK_CAPABILITIES);
    eval 'sub SF16FMI_CAPABILITIES () { &RADIO_CAPS_REFERENCE_FREQ;}' unless defined(&SF16FMI_CAPABILITIES);
    eval 'sub RT_WREN_ON () {(1<< 0);}' unless defined(&RT_WREN_ON);
    eval 'sub RT_WREN_OFF () {(0<< 0);}' unless defined(&RT_WREN_OFF);
    eval 'sub RT_CLCK_ON () {(1<< 1);}' unless defined(&RT_CLCK_ON);
    eval 'sub RT_CLCK_OFF () {(0<< 1);}' unless defined(&RT_CLCK_OFF);
    eval 'sub RT_DATA_ON () {(1<< 2);}' unless defined(&RT_DATA_ON);
    eval 'sub RT_DATA_OFF () {(0<< 2);}' unless defined(&RT_DATA_OFF);
    eval 'sub RT_CARD_ON () {(1<< 3);}' unless defined(&RT_CARD_ON);
    eval 'sub RT_CARD_OFF () {(0<< 3);}' unless defined(&RT_CARD_OFF);
    eval 'sub RT_SIGNAL_METER () {(1<< 4);}' unless defined(&RT_SIGNAL_METER);
    eval 'sub RT_VOLUME_DOWN () {(1<< 6);}' unless defined(&RT_VOLUME_DOWN);
    eval 'sub RT_VOLUME_UP () {(2<< 6);}' unless defined(&RT_VOLUME_UP);
    eval 'sub RT_VOLUME_STEADY () {(3<< 6);}' unless defined(&RT_VOLUME_STEADY);
    eval 'sub RT_SIGNAL_METER_DELAY () {150000;}' unless defined(&RT_SIGNAL_METER_DELAY);
    eval 'sub RT_VOLUME_DELAY () {100000;}' unless defined(&RT_VOLUME_DELAY);
}
1;
