- or download this
sub input_pin {
my $name = sprintf( "Device::BCM2835::RPI_V2_GPIO_P1_%02d", $_[0] )
+;
no strict "refs";
return $name->();
}
- or download this
my @input_pin;
for ( @Device::BCM2835::EXPORT_OK ) {
...
my $val = do { no strict "refs"; "Device::BCM2835::$_"->() };
$input_pin[ $pin ] = $val;
}
- or download this
$input_pin[3]
$input_pin[5]
$input_pin[7]
...
- or download this
input_pin(3)
input_pin(5)
input_pin(7)