-
Notifications
You must be signed in to change notification settings - Fork 1
Add support for getting/setting GPIOs #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
10e3ca3
a5ff197
29d41f5
d8f8f51
af0dd7f
1baa847
de2a5fb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,10 +3,11 @@ name = "cy_serial_bridge" | |
| # this is used by Ruff to disable "upgrade to feature x" inspections where x was added | ||
| # after the given version | ||
| requires-python = ">=3.10" | ||
| version = "0.3.2" | ||
| version = "0.3.3" | ||
| description = "Pure Python driver for using and reconfiguring the CY7C652xx family of USB to SPI/I2C/UART bridge ICs." | ||
| authors = [ | ||
| {name = "Jamie Smith", email = "[email protected]"}, | ||
| {name = "Richard Unger", email = "[email protected]"}, | ||
| ] | ||
| readme = "README.md" | ||
| license = {text = "LGPL"} | ||
|
|
@@ -15,7 +16,7 @@ classifiers = [ | |
| # 3 - Alpha | ||
| # 4 - Beta | ||
| # 5 - Production/Stable | ||
| "Development Status :: 3 - Beta", | ||
| "Development Status :: 3 - Alpha", | ||
|
|
||
| # Indicate who your project is intended for | ||
| "Intended Audience :: Developers", | ||
|
|
@@ -33,7 +34,7 @@ classifiers = [ | |
|
|
||
| [tool.poetry] | ||
| name = "cy_serial_bridge" | ||
| version = "0.3.2" | ||
| version = "0.3.3" | ||
| description = "Pure Python driver for using and reconfiguring the CY7C652xx family of USB to SPI/I2C/UART bridge ICs." | ||
| authors = ["Jamie Smith <[email protected]>"] | ||
| readme = "README.md" | ||
|
|
@@ -45,6 +46,7 @@ repository = 'https://github.com/mbed-ce/cy_serial_bridge/' | |
|
|
||
| [tool.poetry.scripts] | ||
| cy_serial_cli = 'cy_serial_bridge.cli:main' | ||
| cy_flash = 'cy_serial_bridge.flash:main' | ||
|
|
||
| [tool.poetry.urls] | ||
| "Tracker" = 'https://github.com/mbed-ce/cy_serial_bridge/issues' | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,7 +59,7 @@ class CyType(IntEnum): | |
| 6 # Used to indicate a device which is in CDC UART mode (which will automatically work using an OS driver) | ||
| ) | ||
| UART_PHDC = 7 # Used to indicate a device which is in PHDC (Personal Healthcare Device Class) UART mode | ||
|
|
||
| CDC_DATA = 8 # Used to indicate the CDC data interface (which is a separate interface from the CDC UART interface) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Random question, do you have a source for what this interface actually does? I don't actually know, and I think I wasn't able to find out easily back when I was looking into this. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I was curious myself... There is a CDC defintion for SPI devices also, maybe its related to that? |
||
|
|
||
| class CyVendorCmds(IntEnum): | ||
| CY_GET_VERSION_CMD = 0xB0 | ||
|
|
@@ -86,8 +86,13 @@ class CyVendorCmds(IntEnum): | |
| CY_JTAG_READ_CMD = 0xD2 | ||
| CY_JTAG_WRITE_CMD = 0xD3 | ||
|
|
||
| # From Infineon's forums on Mar 24, 2023, here: https://community.infineon.com/t5/USB-low-full-high-speed/CY7C65215-Get-Set-GPIO-Config/td-p/336658 | ||
| # "CY_GPIO_GET_CONFIG_CMD is maintaining in CyUSBCommon.h but it has not been implemented at the | ||
| # hoist side and Silicon so this will not work, we apologize for the confusion with this code | ||
| # will remove this in the upcoming release so it does not create confusion to the user." | ||
| CY_GPIO_GET_CONFIG_CMD = 0xD8 | ||
| CY_GPIO_SET_CONFIG_CMD = 0xD9 | ||
| # GET_VALUE and SET_VALUE are implemented and can be used | ||
| CY_GPIO_GET_VALUE_CMD = 0xDA | ||
| CY_GPIO_SET_VALUE_CMD = 0xDB | ||
|
|
||
|
|
@@ -191,7 +196,8 @@ class CyUart(IntEnum): | |
| CY_GET_SILICON_ID_LEN = 4 | ||
| CY_GET_FIRMWARE_VERSION_LEN = 8 | ||
| CY_GET_SIGNATURE_LEN = 4 | ||
|
|
||
| CY_GET_GPIO_LEN = 2 | ||
| CY_SET_GPIO_LEN = 1 | ||
|
|
||
| # PHDC related macros | ||
| class CyPhdc(IntEnum): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is pointing to a script that doesn't exist (in this PR at least?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh sorry - it's a utility for flashing NOR flash chips and similar devices that I'm working on. You need something a bit more complicated than the SPI write of the general CLI, and there are many options, so I thought a separate cy_flash cli program is the way to go.
Its a work in progress, the branch for it is here: https://github.com/runger1101001/cy_serial_bridge/tree/cy_flash_utility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I'll make a separate PR when its ready so for now I will back out this change from this PR.