Subject: Re: Dallas semiconductor "one-wire" and envsys(4)
To: Aaron J. Grier <>
From: Chapman Flack <>
List: current-users
Date: 02/27/2006 18:41:21
Aaron J. Grier wrote:
> just kidding; I deal with these parts on an embedded target at work and
> they are problematic.  the enumeration process is especially awful.
> I imagine some ports are worse than others regarding spinning in the
> kernel with interrupts masked...

Application notes for these things describe protocols for reliable
reading and writing in scenarios where, for example, your interface
to the device is a contact on the wall, in the rain, near a bus stop,
against which your user presses his one-wire device, with sweaty hands,
and a tic. It seems to boil down to a lot of paranoid integrity
checking, and retrying till you get it right.

Though I haven't tried it and don't know that I'd want to, it seems
like the same approaches could be used to reduce the impact of
spinning with interrupts masked.  Could leave more interrupts unmasked
for the benefit of the rest of the system, and if one happens to
interrupt you at a critical moment, well, you got a bad read, and you
delay() a little for good citizenship's sake, and try, try again.

I've never tried to implement this so I readily acknowledge I might
be talking through my hat.