pyA64
Description
The package provide methods for controlling GPIO pins via memory access. It’s written for A64-OLinuXino, but it can be used with other boards. In this case proper operation is not guaranteed.
Notes:
When using GPIO make sure that the desired gpio is not used by another periphery.
Using this library requires root access.
Currently (0.1.0) port L is not supported, because the memory cannot be accessed from userspace.
GPIO methods
The following methods are available:
init() - Make initialization of the module. Must be called first.
getcfg() - Read current configuration of gpio.
setcfg() - Write configuration to gpio.
input() - Return current value of gpio.
output() - Set output value.
pullup() - Set pull-up/pull-down.
The available constants are:
HIGH - 1
LOW - 0
INPUT - 0
OUPTUT - 1
PULLUP - 1
PULLDOWN - 2
The gpio are named two ways:
By port name: PH0, PG2, PE10, etc. These can be imported from port module:
>>> from pyA64.gpio import port
>>> dir(port)
By connector name and pin number: gpio2p12, gpio3p8, lcdp18, uext1p3 and etc:
>>> from pyA64.gpio import connector
>>> dir(connector)
Generally these constants are just an offset in the memory from the base GPIO address, so they can be assigned to a number type variable.
>>> led = port.PE17
>>> print led
226
Changelog
pyA64 0.1.0 (21 NOV 2017)
Initial release
Metadata
Release files for pyA64 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyA64-0.1.0.tar.gz | 7.3 kB | Without provenance | Details |
Release files / pyA64-0.1.0.tar.gz
| Download URL | pyA64-0.1.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47a203ed3cc73211041041520d30306930d03d765b168903ea2069b9ee0dc4bb
|
|
BLAKE2b-256 checksum How to use checksums |
29a8e9ce35c362e6340713bbbffcf260c4ffca87b404d9811e5d400f33e6c5c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyA64 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.