";
return $newval;
}
$Led1=$_REQUEST[Led1]; // assign the requested value for one or the other pin,
$Led2=$_REQUEST[Led2]; // the other value stays empty
if( !(is_numeric( $Led1) or is_numeric( $Led2)) ) { // first call, not initialised yet
echo "Init direction
";
SetPortDir($GPIO1, "out"); // set the ports direction tot output
SetPortDir($GPIO2, "out");
} else {
$Led1 = SwitchLed( $GPIO1, $Led1); // act upon the requested value for Led1, and return the actual value
$Led2 = SwitchLed( $GPIO2, $Led2); // act upon the requested value for Led2, and return the actual value
}
?>
WIDTH="50">Led1 | ON | OFF |
>Led2 | ON | OFF |
Led1 | ON | OFF |
Led2 | ON | OFF |