in reply to How to make a variable in hard call.

I think you're looking for a dispatch table. You could dynamically create the call with an embedded variable name with UNIVERSAL::can(...) but let's not.

Your code could look something like this:
my %GPIO = (
    1 => \&Device::BCM2835::RPI_V2_GPIO_P1_01,
    # [...]
    7 => \&Device::BCM2835::RPI_V2_GPIO_P1_07
);

# [...]

my $pin = 7; # Or however you decide on the correct pin
Device::BCM2835::gpio_fsel($GPIO{$pin}->(), $inputcmd);