The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Device::Chip::MAX1166x - chip driver for MAX1166x family

SYNOPSIS

   use Device::Chip::MAX1166x;
   use Future::AsyncAwait;

   my $chip = Device::Chip::MAX1166x->new;
   await $chip->mount( Device::Chip::Adapter::...->new );

   printf "The reading is %d\n", await $chip->read_adc;

DESCRIPTION

This Device::Chip subclass provides specific communications to a chip in the Maxim MAX1166x family, such as MAX11661, MAX11663 or MAX11665.

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.

METHODS

The following methods documented in an await expression return Future instances.

read_adc

   $value = await $chip->read_adc;

Performs a conversion and returns the result as a plain unsigned 12-bit integer.

read_adc_ratio

   $ratio = await $chip->read_adc_ratio;

Performs a conversion and returns the result as a floating-point number between 0 and 1.

AUTHOR

Paul Evans <leonerd@leonerd.org.uk>