Assertion added to serial_usb driver in order to detect an anomalous condition.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12528 110e8d01-0319-4d1e-a829-52ad28d1bb01
This commit is contained in:
parent
a3653f3b16
commit
90ddeb9ef8
|
@ -188,14 +188,13 @@ static void obnotify(io_buffers_queue_t *bqp) {
|
|||
|
||||
/* Checking if there is already a transaction ongoing on the endpoint.*/
|
||||
if (!usbGetTransmitStatusI(sdup->config->usbp, sdup->config->bulk_in)) {
|
||||
/* Trying to get a full buffer.*/
|
||||
/* Getting a full buffer, a buffer is available for sure because this
|
||||
callback is invoked when one has been inserted.*/
|
||||
uint8_t *buf = obqGetFullBufferI(&sdup->obqueue, &n);
|
||||
if (buf != NULL) {
|
||||
/* Buffer found, starting a new transaction.*/
|
||||
osalDbgAssert(buf != NULL, "buffer not found");
|
||||
usbStartTransmitI(sdup->config->usbp, sdup->config->bulk_in, buf, n);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver exported functions. */
|
||||
|
|
Loading…
Reference in New Issue