Help for this page

Select Code to Download


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