This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Getting battery status on ipaq
- To: Jonathan Larmour <jlarmour at redhat dot com>
- Subject: Re: [ECOS] Getting battery status on ipaq
- From: Cristiano Ligieri Pereira <cpereira at ics dot uci dot edu>
- Date: Wed, 3 Oct 2001 16:25:08 -0700 (PDT)
- cc: ecos-discuss at sourceware dot cygnus dot com
I'm calling the function get_batt_status from a endless loop and the
cyg_thread_delay() is also within the loop body. There is only this thread
running on the system in my tests.
---------------------------------------------------------------------------
int main(void)
{
int count = 0;
batt_device_t batt;
while (1) {
if (get_batt_status(&batt)) {
/* printf a lot of info */
}
cyg_thread_delay(50);
}
return 0;
}
---------------------------------------------------------------------------
Thanks,
Cristiano.
------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
> Sorry, where are you calling cyg_thread_delay()? Could it just be as simple
> as the cyg_thread_delay causing another thread to be scheduled which
> doesn't relinquish control? Or perhaps the deschedule causes another device
> to talk to the Atmel and confuse it.
>
> Just a suggestion anyway, even though I know little about the Atmel.
>
> Jifl
> --
> Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
> Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
>