From: Peter Henn Date: Wed, 2 Aug 2017 13:31:13 +0000 (+0200) Subject: Extend README.md for FT232R and Limitations of PL2303 X-Git-Tag: v0.1~5 X-Git-Url: http://git.linex4red.de/pub/pl2303-ft232-gpio.git/commitdiff_plain/110a57baa227f2581a0f2a02592336473046f55f Extend README.md for FT232R and Limitations of PL2303 --- diff --git a/README.md b/README.md index a5f6e77..d680929 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ -# PL2303 and CP2103 Userspace GPIO control tools +# PL2303, CP2103 and FT232R Userspace GPIO control tools This is a set of small tools for linux userspace that allows you to interact -with GPIO lines on PL2303HX and CP2103 devices. +with GPIO lines on PL2303HX, CP2103 and FT232R devices. PL2303: It has only been tested on PL2303HXA, but may work for other revisions. CP2103: It has only been tested on CP2103, but may work for other revisions/versions. +FT232R: It has only been tested on FT232R, but may work also for other revisions/versions. Since no common GPIO driver for those exists at the time of writing in the linux kernel - this should serve as a placeholder till upstream guys @@ -29,10 +30,10 @@ To automagically install and reload rules run sudo make install-rules ``` -and replug your pl2303/cp2103 dongles. You should no longer need root +and replug your pl2303/cp2103/ft232r dongles. You should no longer need root permissions to access gpio in them. -## Do I have to close minicom / rmmod pl2303 to use this tool ? +## Do I have to close minicom / rmmod pl2303 or rmmod ftdi_sio to use this tool ? Nope. Just run it in a separate terminal whenever you need it @@ -93,11 +94,47 @@ Examples: ./pl2303gpio --gpio=1 --out 1 ./pl2303gpio --gpio=0 --out 0 --gpio=1 --in +Notes: + pl2302gpio actually do *not* support for gpio>=2. + Witout notice gpio=0 is used in this case! + All arguments are executed from left to right, you can add delays using --sleep v option. e.g. ./pl2303gpio --gpio=0 --out 0 --sleep 1000 --gpio=0 --out 1 ``` +FT232R +``` +FT232R userspace GPIO control tool +(c) Peter Henn 2017, License: GPLv3 +Usage: ./ft232rgpio [action1] [action2] ... +Options are: + --product=blah - Use device with this 'product' string + --serial=blah - Use device with this 'serial' string + --manuf=blah - Use device with this 'manufacturer' string + -g/--gpio n - select GPIO, n=0, 1 + -i/--in - configure GPIO as input + -o/--out v - configure GPIO as output with value v + -r/--read v - Read current GPIO value + + -s/--sleep v - Delay for v ms + +Examples: + ./ft232rgpio --gpio=1 --out 1 + ./ft232rgpio --gpio=0 --out 0 --gpio=1 --in + +Notes: + Changing the so called CBUS GPIO lines of the FT232R chip + requires prior a correct programming of the embedded EEPROM + of this chip. Ft232rgpio is tested only for gpio outputs + and altering only one GPIO line! + +All arguments are executed from left to right, you can add +delays using --sleep v option. e.g. + ./ft232rgpio --gpio=0 --out 0 --sleep 1000 --gpio=0 --out 1 +``` + + ## Limitations cp2303 code misses magic required for 'input' mode of GPIO lines. @@ -126,4 +163,4 @@ don't need udev rules on a mac. ## License -GPLv3. I'm too lazy to copy all the text here. Google for it. \ No newline at end of file +GPLv3. I'm too lazy to copy all the text here. Google for it.