parallel64.pins
¶
parallel64.pins
Individual pin and pin collection functionalities used as part of a GPIO port
Author(s): Alec Delaney
Module Contents¶
Classes¶
Class representing a pin |
|
Class representing an individual data pin, including a |
|
Class representing an individual status pin, including a |
|
Class representing an individual control pin, including a |
|
Class representing all the pins for a given port (connected to |
- class parallel64.pins.Pin(pin_number: int, bit_index: int, register: int, hw_inverted: bool = False)¶
Class representing a pin
- property hw_inverted(self) bool ¶
Returns whether a pin is hardware inverted
- property output_allowed(self) bool ¶
Returns whether a pin allows output
- property input_allowed(self) bool ¶
Returns whether a pin allows input
- class parallel64.pins.DataPin(pin_number: int, bit_index: int, register: int, is_bidir: bool)¶
Bases:
Pin
Class representing an individual data pin, including a class-wide threading.Lock for I/O operations
- Variables
register_lock (threading.Lock) – A class-wide thread lock useful for making I/O safe code
- class parallel64.pins.StatusPin(pin_number: int, bit_index: int, register: int, hw_inverted: bool = False)¶
Bases:
Pin
Class representing an individual status pin, including a class-wide threading.Lock for I/O operations
- Variables
register_lock (threading.Lock) – A class-wide thread lock useful for making I/O safe code
- class parallel64.pins.ControlPin(pin_number: int, bit_index: int, register: int, hw_inverted: bool = False)¶
Bases:
Pin
Class representing an individual control pin, including a class-wide threading.Lock for I/O operations
- Variables
register_lock (threading.Lock) – A class-wide thread lock useful for making I/O safe code
- class parallel64.pins.Pins(data_address: int, is_bidir: bool)¶
Class representing all the pins for a given port (connected to registers). Interaction with this class typically takes place by manipulating the ‘pins’ attribute of an instance of ‘GPIOPort’:
import parallel64 gpio = parallel64.GPIOPort(0x1234) input_pin = gpio.pins.D0 pin_value = gpio.read_pin(input_pin)
Data Pins: D0, D1, D2, D3, D4, D5, D6, D7
Status Pins: ACK, BUSY, PAPER_OUT, SELECT_IN, ERROR
Control Pins: STROBE, AUTO_LINEFEED, INITIALIZE, SELECT_PRINTER