require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SDMMC_CHIP_H_)) {
    eval 'sub _SDMMC_CHIP_H_ () {1;}' unless defined(&_SDMMC_CHIP_H_);
    eval 'sub sdmmc_chip_host_reset {
        my($tag, $handle) = @_;
	    eval q((($tag)-> &host_reset(($handle))));
    }' unless defined(&sdmmc_chip_host_reset);
    eval 'sub sdmmc_chip_host_ocr {
        my($tag, $handle) = @_;
	    eval q((($tag)-> &host_ocr(($handle))));
    }' unless defined(&sdmmc_chip_host_ocr);
    eval 'sub sdmmc_chip_host_maxblklen {
        my($tag, $handle) = @_;
	    eval q((($tag)-> &host_maxblklen(($handle))));
    }' unless defined(&sdmmc_chip_host_maxblklen);
    eval 'sub sdmmc_chip_card_detect {
        my($tag, $handle) = @_;
	    eval q((($tag)-> &card_detect(($handle))));
    }' unless defined(&sdmmc_chip_card_detect);
    eval 'sub sdmmc_chip_bus_power {
        my($tag, $handle, $ocr) = @_;
	    eval q((($tag)-> &bus_power(($handle), ($ocr))));
    }' unless defined(&sdmmc_chip_bus_power);
    eval 'sub sdmmc_chip_bus_clock {
        my($tag, $handle, $freq) = @_;
	    eval q((($tag)-> &bus_clock(($handle), ($freq))));
    }' unless defined(&sdmmc_chip_bus_clock);
    eval 'sub sdmmc_chip_exec_command {
        my($tag, $handle, $cmdp) = @_;
	    eval q((($tag)-> &exec_command(($handle), ($cmdp))));
    }' unless defined(&sdmmc_chip_exec_command);
    eval 'sub SDMMC_SDCLK_OFF () {0;}' unless defined(&SDMMC_SDCLK_OFF);
    eval 'sub SDMMC_SDCLK_400KHZ () {400;}' unless defined(&SDMMC_SDCLK_400KHZ);
    eval 'sub SDMMC_SDCLK_25MHZ () {25000;}' unless defined(&SDMMC_SDCLK_25MHZ);
}
1;
