git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4564 35acf78f-673a-0410-8e92-d51de3d6d3f4
parent
dfe8c5f59d
commit
55f4744930
|
@ -454,6 +454,12 @@ static void otg_txfifo_handler(USBDriver *usbp, usbep_t ep) {
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
uint32_t n;
|
uint32_t n;
|
||||||
|
|
||||||
|
/* Interrupt disabled on transaction end.*/
|
||||||
|
if (usbp->epc[ep]->in_state->txcnt >= usbp->epc[ep]->in_state->txsize) {
|
||||||
|
OTG->DIEPEMPMSK &= ~DIEPEMPMSK_INEPTXFEM(ep);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Number of bytes remaining in current transaction.*/
|
/* Number of bytes remaining in current transaction.*/
|
||||||
n = usbp->epc[ep]->in_state->txsize - usbp->epc[ep]->in_state->txcnt;
|
n = usbp->epc[ep]->in_state->txsize - usbp->epc[ep]->in_state->txcnt;
|
||||||
if (n > usbp->epc[ep]->in_maxsize)
|
if (n > usbp->epc[ep]->in_maxsize)
|
||||||
|
@ -479,12 +485,6 @@ static void otg_txfifo_handler(USBDriver *usbp, usbep_t ep) {
|
||||||
usbp->epc[ep]->in_state->mode.linear.txbuf += n;
|
usbp->epc[ep]->in_state->mode.linear.txbuf += n;
|
||||||
}
|
}
|
||||||
usbp->epc[ep]->in_state->txcnt += n;
|
usbp->epc[ep]->in_state->txcnt += n;
|
||||||
|
|
||||||
/* Interrupt disabled on transaction end.*/
|
|
||||||
if (usbp->epc[ep]->in_state->txcnt >= usbp->epc[ep]->in_state->txsize) {
|
|
||||||
OTG->DIEPEMPMSK &= ~DIEPEMPMSK_INEPTXFEM(ep);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -395,7 +395,31 @@ static void cmd_test(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cmd_usbblast(BaseSequentialStream *chp, int argc, char *argv[]) {
|
static void cmd_usbblast(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
static uint8_t buf[512] =
|
static uint8_t buf[] =
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
||||||
|
@ -407,7 +431,7 @@ static void cmd_usbblast(BaseSequentialStream *chp, int argc, char *argv[]) {
|
||||||
|
|
||||||
(void)argv;
|
(void)argv;
|
||||||
if (argc > 0) {
|
if (argc > 0) {
|
||||||
chprintf(chp, "Usage: test\r\n");
|
chprintf(chp, "Usage: usbblast\r\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue