=encoding UTF-8 =head1 NAME C - chip driver for an F =head1 SYNOPSIS use Device::Chip::TMP102; my $chip = Device::Chip::TMP102->new; $chip->mount( Device::Chip::Adapter::...->new )->get; printf "Temperature is %2.2f C\n", $chip->read_temp->get; =head1 DESCRIPTION This L subclass provides specific communication to a F F attached to a computer via an I²C adapter. Only a subset of the chip's capabilities are currently accessible through this driver. The reader is presumed to be familiar with the general operation of this chip; the documentation here will not attempt to explain or define chip-specific concepts or features, only the use of this module to access them. =cut =head1 MOUNT PARAMETERS =head2 addr The I²C address of the device. Can be specified in decimal, octal or hex with leading C<0> or C<0x> prefixes. =cut =head1 METHODS The following methods documented with a trailing call to C<< ->get >> return L instances. =cut =head2 read_config $config = $chip->read_config->get Reads and returns the current chip configuration as a C reference. SD => 0 | 1 TM => 0 | 1 POL => 0 | 1 F => "1" | "2" | "4" | "6" R0 => 0 | 1 (read only) R1 => 0 | 1 (read only) OS => 0 | 1 EM => 0 | 1 AL => 0 | 1 CR => "0.25Hz" | "1Hz" | "4Hz" | "8Hz" =cut =head2 change_config $chip->change_config( %config )->get Changes the configuration. Any field names not mentioned will be preserved. =cut =head2 read_temp $temp = $chip->read_temp->get Returns the temperature in degrees Celsius. =cut =head2 write_temp_low $chip->write_temp_low( $temp )->get Changes the low temperature threshold in degrees Celsius. =cut =head2 read_temp_low $temp = $chip->read_temp_low->get Returns the low temperature threshold in degrees Celsius. =cut =head2 write_temp_high $chip->write_temp_high( $temp )->get Changes the high temperature threshold in degrees Celsius. =cut =head2 read_temp_high $temp = $chip->read_temp_high->get Returns the high temperature threshold in degrees Celsius. =cut