I am developing battery driver using Windows CE 5.0 and SHARP's ARM9
microprocessor LH7A404.

The touch panel driver has already used the Analog-to-Digital Converter of
LH7A404, and I don't want to add one more Analog-to-Digital device, so the
LH7A404's Analog-to-Digital Converter was used by two driver at the same
time. It is really a nightmare. The two driver might use the
Analog-to-Digital Converter at the same time and two drivers get the wrong
result!

So I try to make a globe variable. When the touch panel want to use the
Analog-to-Digital Converter, set the variable to "0", and set it to "1" when
finish. The battery driver should read the varible before using the
Analog-to-Digital Converter. Read "1" means it can use. So where should I put
the globle varible or is there a better solution?

Re: How to use one Analog-to-Digital Converter between Two drivers? by Dean

Dean
Fri Aug 25 10:20:00 CDT 2006

Use a named mutex. Global variables won't work because they are in
different drivers in different processes. Alternatively you could create an
A/D driver and have both the touch and A/D code use that driver.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Jack Chen" <JackChen@discussions.microsoft.com> wrote in message
news:3AE5E1D5-6EAC-42E9-9F25-2C1B0FD6D95E@microsoft.com...
>I am developing battery driver using Windows CE 5.0 and SHARP's ARM9
> microprocessor LH7A404.
>
> The touch panel driver has already used the Analog-to-Digital Converter of
> LH7A404, and I don't want to add one more Analog-to-Digital device, so the
> LH7A404's Analog-to-Digital Converter was used by two driver at the same
> time. It is really a nightmare. The two driver might use the
> Analog-to-Digital Converter at the same time and two drivers get the wrong
> result!
>
> So I try to make a globe variable. When the touch panel want to use the
> Analog-to-Digital Converter, set the variable to "0", and set it to "1"
> when
> finish. The battery driver should read the varible before using the
> Analog-to-Digital Converter. Read "1" means it can use. So where should I
> put
> the globle varible or is there a better solution?