Device stubs and exceptions added
This commit is contained in:
31
lib/Device/Display/Pcd8544Device.php
Normal file
31
lib/Device/Display/Pcd8544Device.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace NoccyLabs\Gpio\Device\Display;
|
||||
|
||||
use NoccyLabs\Gpio\Device\Device;
|
||||
|
||||
class Pcd8544Device extends Device
|
||||
{
|
||||
protected function configure()
|
||||
{
|
||||
$this
|
||||
->setName("pcd8544")
|
||||
->setDescription("Philips PCD8544 LCD Display Driver")
|
||||
->addLogicalPin(0, "dc", "data/command")
|
||||
->addLogicalPin(1, "sce", "chip select")
|
||||
->addLogicalPin(2, "scl", "clock")
|
||||
->addLogicalPin(3, "sda", "data")
|
||||
->addLogicalPin(9, "bl", "backlight")
|
||||
;
|
||||
}
|
||||
|
||||
protected function startup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function setBacklightState($state)
|
||||
{
|
||||
$this->bl->write((int)$state);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user