barower / gpiomock

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Linux sysfs mock gpio access

This library emulates gpio access to the standard linux sysfs interface

It is a mock replacement to gpio module. Useful when developing embedded software on local machine.

Usage

import gpiomock as gpio

Supported Features

  • get pin values with read(pin) or input(pin)
  • set pin values with set(pin, value) or output(pin, value)
  • get the pin mode with mode(pin)
  • set the pin mode with setup(pin, mode)
    • mode can currently equal gpio.IN or gpio.OUT

About

License:MIT License


Languages

Language:Python 100.0%