NAME

    Device::Chip::BV4243 - chip driver for a BV4243

SYNOPSIS

       use Device::Chip::BV4243;
       use Future::AsyncAwait;
    
       my $chip = Device::Chip::BV4243->new;
       await $chip->mount( Device::Chip::Adapter::...->new );
    
       await $chip->lcd_reset;
       await $chip->lcd_string( "Hello, world!" );

DESCRIPTION

    This Device::Chip subclass provides specific communication to a ByVac
    BV4243 LCD/touchpad display module attached to a computer via an I²C
    adapter.

    The reader is presumed to be familiar with the general operation of
    this module; the documention here will not attempt to explain or define
    module-specific concpets or features, only the use of this module to
    access them.

METHODS

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

 clear_keys

       await $chip->clear_keys;

    Clears the keypad buffer.

 get_keycount

       $count = await $chip->get_keycount;

    Returns the number of keys waiting in the keypad buffer.

 get_key

       $key = await $chip->get_key;

    Returns the next key from the keypad buffer, or 0 if there are none.

 find_key

       $pos = await $chip->find_key( $key );

    Returns the position in the key buffer of the given key, or 0 if is not
    there.

 get_scancode

       $code = await $chip->get_scancode;

    Returns the scan value from the keypad scanning matrix. This will be 0
    if no key is being touched, or an integer value with at least two bits
    set if a key is being held.

 beep

       await $chip->beep( $msec );

    Turns on the BELL output line for the specified number of miliseconds.

 read_chan

       @channels = await $chip->read_chan;

    Returns the raw touchpad sensor values as 8 16bit integers.

 read_delta

       @deltas = await $chip->read_delta;

    Returns the touchpad sensor values minus the trigger value.

 sleep

       await $chip->sleep;

    Puts the device into sleep mode. It stops scanning the keypad, but will
    still respond to another command which will wake it up again.

 lcd_reset

       await $chip->lcd_reset;

    Resets the LCD.

 lcd_command

       await $chip->lcd_command( $cmd );

    Sends a numeric command to the LCD controller.

 lcd_data

       await $chip->lcd_data( $data );

    Sends a byte of numerical data to the LCD controller.

 lcd_string

       await $chip->lcd_string( $str );

    Sends a string of data to the LCD controller. This is a more efficient
    version of sending each byte of the string individually using
    "lcd_data".

 lcd_signon

       await $chip->lcd_signon;

    Displays the signon string stored the in EEPROM.

 lcd_backlight

       await $chip->lcd_backlight( $red, $green, $blue );

    Sets the level of each of the three backlight channels. Each must be a
    numeric value between 0 and 10 (inclusive). For single-backlight
    displays, use the $red channel.

 reset

       $chip->reset

    Resets the device.

 device_id

       $id = await $chip->device_id;

    Returns the device ID value as a 16 bit integer

 version

       $id = await $chip->version;

    Returns the device firmware version as a 16 bit integer

 eeprom_reset

       await $chip->eeprom_reset;

    Resets the configuration EEPROM back to default values.

 eeprom_read

       $val = await $chip->eeprom_read( $addr );

    Reads a byte from the configuration EEPROM.

 eeprom_write

       await $chip->eeprom_write( $addr, $val );

    Writes a byte to the configuration EEPROM.

SEE ALSO

    http://www.pichips.co.uk/index.php/BV4243

AUTHOR

    Paul Evans <leonerd@leonerd.org.uk>

