require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_LM700X_H_)) {
    eval 'sub _LM700X_H_ () {1;}' unless defined(&_LM700X_H_);
    require 'sys/types.ph';
    require 'machine/bus.ph';
    eval 'sub LM700X_REGISTER_LENGTH () {24;}' unless defined(&LM700X_REGISTER_LENGTH);
    eval 'sub LM700X_DATA_MASK () {0xffc000;}' unless defined(&LM700X_DATA_MASK);
    eval 'sub LM700X_FREQ_MASK () {0x3fff;}' unless defined(&LM700X_FREQ_MASK);
    eval 'sub LM700X_FREQ {
        my($x) = @_;
	    eval q(($x << 0));
    }' unless defined(&LM700X_FREQ);
    eval 'sub LM700X_LSI {
        my($x) = @_;
	    eval q(($x << 14));
    }' unless defined(&LM700X_LSI);
    eval 'sub LM700X_BAND {
        my($x) = @_;
	    eval q(($x << 16));
    }' unless defined(&LM700X_BAND);
    eval 'sub LM700X_STEREO () { &LM700X_BAND(3);}' unless defined(&LM700X_STEREO);
    eval 'sub LM700X_MONO () { &LM700X_BAND(1);}' unless defined(&LM700X_MONO);
    eval 'sub LM700X_TIME_BASE {
        my($x) = @_;
	    eval q(($x << 19));
    }' unless defined(&LM700X_TIME_BASE);
    eval 'sub LM700X_REF_FREQ {
        my($x) = @_;
	    eval q(($x << 20));
    }' unless defined(&LM700X_REF_FREQ);
    eval 'sub LM700X_REF_100 () { &LM700X_REF_FREQ(0);}' unless defined(&LM700X_REF_100);
    eval 'sub LM700X_REF_025 () { &LM700X_REF_FREQ(2);}' unless defined(&LM700X_REF_025);
    eval 'sub LM700X_REF_050 () { &LM700X_REF_FREQ(4);}' unless defined(&LM700X_REF_050);
    eval 'sub LM700X_DIVIDER_AM () {(0<< 23);}' unless defined(&LM700X_DIVIDER_AM);
    eval 'sub LM700X_DIVIDER_FM () {(1<< 23);}' unless defined(&LM700X_DIVIDER_FM);
    eval 'sub LM700X_WRITE_DELAY () {6;}' unless defined(&LM700X_WRITE_DELAY);
}
1;
