Skip to content

Commit

Permalink
Adding missing $invert parameter to the VfsAdapter and the AdapterInt…
Browse files Browse the repository at this point in the history
…erface.
  • Loading branch information
allebb committed Aug 25, 2017
1 parent f2ca633 commit 46cedb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Adapters/VfsAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ class VfsAdapter implements AdapterInterface
*
* @param int $pin The BCM pin number
* @param string $direction The type/direction of the pin - Use GPIO::IN and GPIO::OUT
* @param bool $invert Invert the logic so that high->low and low->high
* @return bool
*/
public function setDirection(int $pin, string $direction): bool
public function setDirection(int $pin, string $direction, bool $invert = false): bool
{
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Interfaces/AdapterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ public function read(int $pin): int;
*
* @param int $pin The BCM pin number
* @param string $direction The type/direction of the pin - Use GPIO::IN and GPIO::OUT
* @param bool $invert Invert the logic so that high->low and low->high
* @return bool
*/
public function setDirection(int $pin, string $direction): bool;
public function setDirection(int $pin, string $direction, bool $invert = false): bool;

}

0 comments on commit 46cedb0

Please sign in to comment.