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

Serdisp - Perl extension for talking to the serdisplib

SYNOPSIS

    use Serdisp;

    my $d = Serdisp->new('USB:7c0/1501', 'ctinclud');
    $d->init();
    $d->clear();

    # reserves a color-indexed picture
    my $image = GD::Image->new(128,64);
    my $black = $image->colorAllocate(0,0,0);
    my $white = $image->colorAllocate(255,255,255);

    $image->transparent($black);
    $image->arc(10,10,10,10,0,270, $white);
    $d->copyGD($image);

DESCRIPTION

This library is a quick interface to serdisplib.

PUBLIC INTERFACE

$d = Serdisp->new(connection,displaytype)

This will open the serdisp library for you. The first string is some kind of connector that describes the kind of interface your are using to talk to your display:

Examples:

   /dev/parport0 - parallel port
   0x378 - direct IO
   USB:7c0/1501 - USB device with the given product id
   ...

The second is the type of the display.

Examples:

   ctinclud
   PCD8544
   ...
$d->init()

This will init the display and turn it on. The the display can't found with your specified parameter the method will croak.

$d->width()

Returns the width of the display in pixel.

$d->copyGD(GD)

This will copy your given GD object into the buffer of the serdisp library. After that the display will be updated to display the content of the internal buffer. All non-black pixels (red >0 || green > 0 || blue > 0) will be translated to a set pixel on the display. No dithering at all!

If you GD area is bigger than your display the rest of the GD area will be ignored.

If you GD area is lesser than your display the rest of the display area will be untouched.

$d->clear()

Will clear the internal buffer of the serdisp library and force an update of the display.

EXPORT

None by default.

SEE ALSO

GD

AUTHOR

Erik Wasser, <erik.wasser@iquer.net>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Erik Wasser

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.7 or, at your option, any later version of Perl 5 you may have available.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 117:

You forgot a '=back' before '=head2'