On Thursday 07 July 2005 09:50 pm, Matthew Percival wrote:
> G'Day,
>
>       I tried using owfs on my OMAP board, but even after I added basic
> support for the DS2431, it did not list the device in /mnt/1wire --- I
> am assuming that this is largely because of the unusual environment that
> I am operating under.  Given the report that I had a bad adaptor, this
> assumption seems fairly likely.
>
Since I don't have a DS2431 device, you will have to tell me if it works with 
OWFS in a more traditional environment. OWFS should see all devices, even if 
explicit support hadn't been added. You would get only a minimal 
functionality, however (serial number, essentially), so I wonder if there 
isn't a electrical problem.

>       This board has hardware support for 1-Wire, so I decided that taking
> advantage of that would be the best way to go.  By directly accessing
> registers, I was able to confirm that I could use this to access the
> device where owfs failed, but due to a hardware bug you *have* to use
> interrupt driven I/O.
Ok.
>
>       I have now just finished writing a kernel module which handles the
> OMAP's hardware support for 1-Wire, and have used a test program to
> interact with the DS2431.  All that remains to do is have a nice, user
> program that can handle interactions with any number of any kind of
> 1-Wire device.  Since one happens to be available here, I figured the
> best approach would be to add in support for my driver to owlib.
Sounds great.
>
>       I am reading through the source to try and work out how this would best
> be done, but I thought it would be a good idea to ask the developers how
> they would suggest going about it: after all, you have a much better
> idea of how this all works than I am likely to figure out in the next
> few days.
Pretty easy. You are right, the adapter support is quite well encapsulated.

Basically all adapter support is in owlib, and transparent to higher levels.

The type of adapter is determined mainly from the command line (though the 
serial adapters are distinguished by their response to a query).

Unique support is in the files

module/owlib/src/c/*

where * is ow_ds1410.c
ow_ds9097.c
ow_ds9097U.c
ow_ds9490.c

(also ow_server.c and ow_badadapter.c)

I would base my support on ow_9097.c which is a bit-banging passive serial 
support.

You'll notice that one of the first commands is DS9097_setroutines which sets 
pointers to adapter-specific functions like

read, write, reset, next_both (search routine), and sendback_data (which sends 
bits and returns the response).

>
>       I figure that since you already support (or, in some cases, plan to
> support) different protocols (serial, USB, etc), you would have designed
> the program in such a way that a new one can be added without having to
> pull your hair out: I want to add the omap-on-board-using-kernel-driver
> method.  I have made the driver pretty simple (being my first driver, it
> could not be anything *but* simple), and as such you only have to open()
> a /dev/ file (eg /dev/owire) then write() and read() as needed.
>
so can you send a bit and see the response? Can you reset? can you set 
power-on (for conversion?) That's enough!

>       Would it be much work for me to add support for this?  Assuming this is
> not something only a person out of his mind would attempt, does anyone
> have any suggestions about how best to go about this?
Glad to help you and include it!
>
>       -- Matthew


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to