Metadata-Version: 2.1
Name: greenpak
Version: 0.0.10
Summary: A driver for programming Renesas's GreenPak SPLD devices.
Project-URL: Homepage, https://github.com/zapta/greenpak
Project-URL: Bug Tracker, https://github.com/zapta/greenpak/issues
Author-email: Zapta <zapta@zapta.com>
License-File: LICENSE
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Requires-Dist: i2c-adapter>=0.0.4
Description-Content-Type: text/markdown

# GreenPak Driver
A Python package to access and program Renesas GreenPak SPLD's.

This Python package provides a simple to use API to read/write/program Renseas GreenPak PLDs over a USB to I2C link. 

Sample usage using the [I2C Adapter](https://pypi.org/project/i2c-adapter):
```python
import greenpak as gp

print("Connecting.")
i2c_driver = gp.drivers.GreenPakI2cAdapter(port = "COM17")
gp_driver = gp.GreenpakDriver(i2c_driver, device="SLG46826", control_code=0b0001)

print("Loading configuration.")
data = gp.read_bits_file("test_data/slg46826_blinky_fast.txt")
gp.hex_dump(data)

print("Programming the NVM.")
gp_driver.program_nvm_pages(0, data)

print ("Reading the NVM.")
data = gp_driver.read_nvm_bytes(0, 256)
gp.hex_dump(data)

print("Resetting the device.")
gp_driver.reset_device()
```
