Linux::Apple::Laptop::LED - Turn the front LED on Apple laptops on and off via ADB
use IO::Handle (); use Time::HiRes qw(usleep); use Linux::Apple::Laptop::LED qw(ON OFF); open my $fh, ">", "/dev/adb" or die $!; $fh->autoflush(1); my $nap = 100_000; # 0.1 seconds for (1 .. 10) { syswrite($fh => ON); usleep($nap / 2); syswrite($fh => OFF); usleep($nap / 2); }
Provides an interface for turning the front LED on Apple laptops running Linux on and off. The user needs to open /dev/adb and print either ON or OFF to it to turn the led on and off, respectively.
ON
OFF
Can optionally export two constant subroutines, ON ond OFF, which return a string to be written to /dev/adb.
Ævar Arnfjörð Bjarmason <avar@cpan.org>
Copyright 2007 Ævar Arnfjörð Bjarmason.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Linux::Apple::Laptop::LED, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Linux::Apple::Laptop::LED
CPAN shell
perl -MCPAN -e shell install Linux::Apple::Laptop::LED
For more information on module installation, please visit the detailed CPAN module installation guide.