The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

IBM::ThinkPad::ACPI::Extras - Provides an interface to the IBM ThinkPad ACPI features

SYNOPSIS

  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');

DESCRIPTION

See the README file that came with the IBM::ThinkPad::ACPI::Extras package for more information.

Public methods

tp_extras_read($feature, $keyword)

The tp_extras_read method is called to read the specified $feature file and looks there for the $keyword (e.g. status).

tp_extras_write($feature, $command)

The tp_extras_write method is called to send the $command to the corresponds $feature file.

EXPORT

tp_extras_read tp_extras_write

AUTHOR

Manuel Gebele, <forensixs[at]gmx.de>

COPYRIGHT AND LICENSE

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.