Oops, early send... Trying again, this time writing the full mail!

The LINK adapter has an extra AUX line which can be used as a general I/O port (somewhat limited though).

Some background, from LinkUSB manual page:
---

The LinkUSBTM supports the standard RJ45 type 1-Wire bus connection wherein the center two contacts of the RJ connector are the data and ground connections to the 1- Wire bus. However, another pin in the RJ connector is also brought into play. This line is, by default, driven to the high impedance state and left un-powered. It can be an output supplying a low level (0 VDC) or a high level (5 VDC), or it can be an input sensing a 0- 5VDC logic level. When set to the 5V level by the “d” command, this line can be used to provide power for DS2409 and DS2406/7 type 1-Wire switches. However, the current available from this output is limited. The amount of current that the Aux line can provide is limited to approximately 75 mA. ASCII commands used by the host can cause the Auxiliary I/O pin to change its behavior as needed.

--
The other Link devices have the same, somewhat different details though, mainly with regards to power levels. Microsoft Word - LinkUSB Users Guide V1.3.doc Microsoft Word - LinkUSB Users Guide V1.3.doc I've added some code to control this line via owfs, commited in branch link-aux:
https://sourceforge.net/p/owfs/code/ci/fca93b164f8b5f0fd0f97bb66d0be7081c751384/

It basically adds two new points in the filesystem:

/bus.N/interface/settings/ link/auxin
/bus.N/interface/settings/link/auxout

This is visible for Link devices only. Auxin allows putting the AUX pin in hi-z mode, and reading the current value. auxout puts the pin in high or low mode.

Is this a good solution? It isn't really a "setting", but it belongs under /bus.0/interface. Also, I didn't put auxin/out on the same node, since sending the "read aux" command will actually put it in Hi-z mode rather than just read it. Reading from auxout is not doable right now, it would only be able to reply the latest written value, which may or may not be correct, so I skipped support for reading.

Let me know how if you think this fits in with the rest of OWFS, or if it should be solved differently.

Regards
Johan


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to