Quantcast
Channel: Objective Development Forums
Viewing all articles
Browse latest Browse all 4524

poll timing

$
0
0
Trying to tweak poll timing a bit here. I'm set to 10ms in config

So I normally do this
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt((void *)&reportBuffer + 0, 8);
while (!usbInterruptIsReady()){usbPoll(); } usbSetInterrupt((void *)&reportBuffer + 8, 5);

If I do it one like
while (!usbInterruptIsReady()) { usbPoll();}
usbSetInterrupt((void *)&reportBuffer + 0, 8 );//send the data

I get 8 ms, doing it like above I get 16ms. Ok makes sense twice right. I need to run two sets as I have 13 packets to send. So is there a better way? I tried this but it does not send all 13.
while (!usbInterruptIsReady()) { usbPoll();}
usbSetInterrupt((void *)&reportBuffer + 0, 8 );//send the data
usbSetInterrupt((void *)&reportBuffer + 0, 5 );//send the data

Viewing all articles
Browse latest Browse all 4524

Trending Articles