[ECOS] Getting battery status on ipaq
Cristiano Ligieri Pereira
cpereira@ics.uci.edu
Wed Oct 3 16:25:00 GMT 2001
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
>
More information about the Ecos-discuss
mailing list