git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4269 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2012-06-11 19:23:28 +00:00
parent aed1b78c87
commit f32e8bf381
1 changed files with 14 additions and 11 deletions

View File

@ -315,18 +315,21 @@ static void otg_fifo_read_to_queue(InputQueue *iqp, size_t n) {
*iqp->q_wrptr++ = (uint8_t)(dw >> 8); *iqp->q_wrptr++ = (uint8_t)(dw >> 8);
if (iqp->q_wrptr >= iqp->q_top) if (iqp->q_wrptr >= iqp->q_top)
iqp->q_wrptr = iqp->q_buffer; iqp->q_wrptr = iqp->q_buffer;
if (--nb > 0) {
*iqp->q_wrptr++ = (uint8_t)(dw >> 16);
if (iqp->q_wrptr >= iqp->q_top)
iqp->q_wrptr = iqp->q_buffer;
if (--nb > 0) {
*iqp->q_wrptr++ = (uint8_t)(dw >> 24);
if (iqp->q_wrptr >= iqp->q_top)
iqp->q_wrptr = iqp->q_buffer;
--nb;
}
}
} }
else if (--nb > 0) {
*iqp->q_wrptr++ = (uint8_t)(dw >> 16);
if (iqp->q_wrptr >= iqp->q_top)
iqp->q_wrptr = iqp->q_buffer;
}
else if (--nb > 0) {
*iqp->q_wrptr++ = (uint8_t)(dw >> 24);
if (iqp->q_wrptr >= iqp->q_top)
iqp->q_wrptr = iqp->q_buffer;
}
--nb;
} while (--nw > 0); } while (--nw > 0);
/* Updating queue.*/ /* Updating queue.*/