Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Configure input/outputs in unified v2 structure
- def cart_toll():
- gpio_config = {
- SWITCH: gpiod.LineSettings(
- direction=Direction.INPUT,
- bias=Bias.PULL_DOWN,
- edge_detection=Edge.RISING
- ),
- STEP_PIN: gpiod.LineSettings(
- direction=Direction.OUTPUT,
- output_value=Value.INACTIVE
- ),
- DIR_PIN: gpiod.LineSettings(
- direction=Direction.OUTPUT,
- output_value=Value.INACTIVE
- ),
- },
- oe_config = {
- OE_THREE: gpiod.LineSettings(
- direction=Direction.OUTPUT,
- output_value=Value.INACTIVE
- )
- }
- # --- Output Enable GPIO on the Driver (DM542T) ---
- def oe_three_go(oe_request, start: bool):
- if start:
- oe_request.set_value(OE_THREE, Value.ACTIVE)
- else:
- oe_request.set_value(OE_THREE, Value.INACTIVE)
Advertisement
Add Comment
Please, Sign In to add comment