IBM::ThinkPad::ACPI::Extras - Perl interface to the IBM ThinkPad ACPI features
use IBM::ThinkPad::ACPI::Extras; # Read status of the 'light' feature my $light_status = tp_extras_read('light', 'status'); # Read possible commands of the 'led' feature my @led_commands = tp_extras_read('led', 'commands'); # Read complete EC dump print tp_extras_read('ecdump'); # For the next examples you'll need root privileges! # Turn LED 1 off (battery) tp_extras_write('led', '1 off'); # Turn LED 1 on tp_extras_write('led', '1 on'); # Turn ThinkLight on tp_extras_write('light', 'on');
See the README file that came with the IBM::ThinkPad::ACPI::Extras package for more information.
tp_extras_read method is called to read the specified $feature file and looks there for the $keyword (e.g. status).
tp_extras_write method is called to send the $command to the corresponding $feature file.
Manuel Gebele, <forensixs[at]gmx.de>
Copyright (C) 2009 by Manuel Gebele.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.