Skip to main content

An easy to use Python API for programming and accessing Renesas's GreenPak SPLD devices.

Project description

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.

As of December 2023, the package supports the following USB to I2C interfaces and new ones can be easily added based on the examples in drivers.py:

  • I2C Driver (two variants, mini and full.)
  • I2C Adapter (four variants, including a bare Raspberry Pico.)

Sample usage using an I2C Adapter:

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("Resetting the device.")
gp_driver.reset_device()

For full documentation see https://greenpak.readthedocs.io/en/latest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

greenpak-0.0.28.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

greenpak-0.0.28-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file greenpak-0.0.28.tar.gz.

File metadata

  • Download URL: greenpak-0.0.28.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for greenpak-0.0.28.tar.gz
Algorithm Hash digest
SHA256 175fb9d063f42ecd8d45618762b1d6130beede6da1590f70a0ab09e2adb5fc38
MD5 4652c249d1c8301d941bdc012275dd4f
BLAKE2b-256 6bf3b7d20f4b5465cdab864c60fd2fcb0563539307d7a1976ee2e856dd63adf5

See more details on using hashes here.

File details

Details for the file greenpak-0.0.28-py3-none-any.whl.

File metadata

  • Download URL: greenpak-0.0.28-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for greenpak-0.0.28-py3-none-any.whl
Algorithm Hash digest
SHA256 8c3a5aaad6ceee7aaaf38c8d99037cd80b971b3a5b2fb73dc154488700aacadb
MD5 62b70cebbef1d25761a9c1823237cc9e
BLAKE2b-256 82628743fb11a77783b5d7942e625c1ff398d7885cafb0ea277467ae7d933531

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page