#642 Add hardware detection with FFM plugin#645
Conversation
…s long in ioctl
…s long in ioctl
stefanhaustein
left a comment
There was a problem hiding this comment.
Generally, I'd really prefer if we could first have a discussion about what data structure(s) we publicly expose to the user, depending on what's doable with ffm.
IMHO, this could just be a list of available busses/pins per IO type (i2c, spi, ...)
Also, we might want to check if we are aligned on the purpose here.
My goal when bringing up this topic was to allow generic pi4j-based software to prevent users from selecting hardware parameters outside the physically available ranges.
| import java.util.Set; | ||
|
|
||
| /** | ||
| * Supplies platform-appropriate "how to enable this controller" hints. |
There was a problem hiding this comment.
Where does this information come from?
There was a problem hiding this comment.
From documentation of different boards. Claude helps me to bring this all together.
Let's discuss, this PR is just an attempt to bring some debugging information to the user during startup. It does not mean we cannot expose something to the user with API in structured manner.
I did it sometime ago... But I do not think anybody used it separately with specific API calls. I think library startup is a good place to give a user an overview on what is available.
Can you provide any examples? May be we need to be more specific in checks and exceptions during runtime? |
|



New hardware detection system. Consists of steps:
I put this in FFM plugin right now, not to mess up with dependencies in pi4j-core. When it will be in core we can decide how to move this functions.
Example output (rpi5):
And GPIO related: