-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for in/out GPIO pins on ULX3S
The ULX3S has 2x28 IO pins that can be used either individually or as differential pairs. Currently we're going to assume an individual setup (you can configure their behaviour in the .lpf file). The convention is to see them as gp[27] (GPIO positive) and gn[28] (GPIO negative) arrays. This is how they're numbered on the board itself. To work with this convention, we split out the GPIO address space into 0x00XX and 0x02XX for setting in/output values of gp and gn pins respectively, and use 0x01XX and 0x3XX for setting the direction of the gn and gp pins. We define pinModeGp and pinModeGn to set the pin direction. pinMode becomes an alias for pinModeGn.
- Loading branch information
Showing
2 changed files
with
75 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters