require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_GPIO_GPIOVAR_H_)) {
    eval 'sub _DEV_GPIO_GPIOVAR_H_ () {1;}' unless defined(&_DEV_GPIO_GPIOVAR_H_);
    eval 'sub gpiobus_pin_read {
        my($gc, $pin) = @_;
	    eval q((($gc)-> &gp_pin_read(($gc)-> &gp_cookie, ($pin))));
    }' unless defined(&gpiobus_pin_read);
    eval 'sub gpiobus_pin_write {
        my($gc, $pin, $value) = @_;
	    eval q((($gc)-> &gp_pin_write(($gc)-> &gp_cookie, ($pin), ($value))));
    }' unless defined(&gpiobus_pin_write);
    eval 'sub gpiobus_pin_ctl {
        my($gc, $pin, $flags) = @_;
	    eval q((($gc)-> &gp_pin_ctl(($gc)-> &gp_cookie, ($pin), ($flags))));
    }' unless defined(&gpiobus_pin_ctl);
}
1;
