GPIO
- class Nets.GPIO
Class for controlling GPIO nets
- set(self, mode)
Set GPIO Mode
from lager.pcb.net import Net, NetType reset = Net.get('RESET', type=NetType.GPIO, setup_function=None, teardown_function=None) reset.enable() reset.set(GPIOMode.OUT)
- Parameters:
mode (GPIOMode) -- Set mode of GPIO trace
- output(self, level)
Set GPIO Output Level
from lager.pcb.net import Net, NetType reset = Net.get('RESET', type=NetType.GPIO, setup_function=None, teardown_function=None) reset.enable() reset.set(GPIOMode.OUT) reset.output(GPIOLevel.HIGH) # can use High/Low reset.output(GPIOLevel.LOW) reset.output(GPIOLevel.ON) # or On/Off reset.output(GPIOLevel.OFF)
- Parameters:
level (GPIOLevel) -- Set level for GPIO output nets