sim/ft2232h: Add FT2232H GPIO integration on NuttX sim#18951
Conversation
1e68630 to
0c68d8c
Compare
|
@simbit18 is it possible to install libftdio-dev to get FT2232H integration passing on CI? |
This commit is needed to get PR #18951 passing on CI test. I think this USB Device could be used in the future to do real hardware tests, including automated tests on our CI. Signed-off-by: Alan C. Assis <acassis@gmail.com>
2b03469 to
7db2a5e
Compare
|
@xiaoxiang781216 PTAL |
This patch adds support to use FT2232H as GPIO to control external devices. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This commit add documentation to explain about the FT2232H integration on NuttX. Signed-off-by: Alan C. Assis <acassis@gmail.com>
This board profile configure the FT2232H module to use as a GPIO to NuttX sim. Signed-off-by: Alan C. Assis <acassis@gmail.com>
| uint8_t port_value; | ||
| }; | ||
|
|
||
| #define gpioerr(fmt, ...) \ |
There was a problem hiding this comment.
move to preprocess section
| @@ -45,6 +45,18 @@ | |||
| * Pre-processor Definitions | |||
| ****************************************************************************/ | |||
|
|
|||
| /**************************************************************************** | |||
There was a problem hiding this comment.
move after line 67 and remove the dup banner
There was a problem hiding this comment.
Thank you @xiaoxiang781216
The banners are not duplicated: Type Definitions and Private Types
I think we could remove all those Private * since they are not used
There was a problem hiding this comment.
The banners are not duplicated: Type Definitions and Private Types.
If you want I can remove those Privates* since they are empty.
|
I will add this board config to the blacklist, even after installing the libftdi1-dev in the docker image the CI still failing to find it: ====================================================================================
|
Summary
This driver implements a FT2232H GPIO integration NuttX sim to allow users to read/write external GPIOs and control external devices.
It will help to control external devices using NuttX sim.
The next steps will be adding SPI and I2C integration support.
Impact
User will be able to use a FT2232H module to read/write external GPIO
Testing
nsh> ls /dev
/dev:
console
gpio60
gpio61
gpio62
gpio63
gpio64
gpio65
gpio66
gpio67
loop
null
oneshot
ram0
ram1
ram2
zero
nsh> gpio /dev/gpio60
Driver: /dev/gpio60
gplh_read: pin0: value=0x7fa69b5d4117
Output pin: Value=0
nsh> gpio /dev/gpio60
Driver: /dev/gpio60
gplh_read: pin0: value=0x7fa69b5d4117
Output pin: Value=1
nsh> gpio -o 1 /dev/gpio67
Driver: /dev/gpio67
gplh_read: pin7: value=0x7fa69b5d4117
Output pin: Value=0
Writing: Value=1
gplh_write: pin7: value=1
gplh_read: pin7: value=0x7fa69b5d4117
Verify: Value=1
nsh> gpio -o 0 /dev/gpio67
Driver: /dev/gpio67
gplh_read: pin7: value=0x7fa69b5d4117
Output pin: Value=1
Writing: Value=0
gplh_write: pin7: value=0
gplh_read: pin7: value=0x7fa69b5d4117
Verify: Value=1
nsh>