Skip to contentSkip to conversation

setting omap into idle for some ms

DISCUSSION Martin Margraf 1 participant 1 message Jun 27, 2006

lore
Share & tools
lore
#0 lore raw

hi,

i try to set the osk5912 Rev. D with 2.6.16.18 for 5 ms into idle.
i looked for this and found the nanosleep() function, wich send the omap into sleep for ns-ms. it works fine, but during this sleep the cpu is 100% busy, wich is a problem, cause i would test the cpu usage of my ecg algorithm.
i heard that nanosleep uses for sleep times <=2ms a busy loop, but i use 5ms, where is the problem?

another problem is that i cannot display float in the ttyS0 console. for example:

float i = 3.4143;
printf(".....%f\n",i); is displayed as long long number
i tried to declare the number as double, same problem. the same with every format like %5.6f. does someone has the same prob?

regards

martin
______________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193