experimental speed-up of cdc Tx

remotes/github/bad-doublebuf
Ondřej Hruška 7 years ago
parent 0b14e5dda4
commit da330b4b73
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 8
      TinyFrame/TF_Integration.c

@ -4,6 +4,7 @@
// TinyFrame integration // TinyFrame integration
// //
#include <USB/usb_device.h>
#include "platform.h" #include "platform.h"
#include "task_main.h" #include "task_main.h"
@ -26,7 +27,12 @@ void TF_WriteImpl(TinyFrame *tf, const uint8_t *buff, uint32_t len)
} }
const uint16_t chunksize = (uint16_t) MIN(total, CHUNK); const uint16_t chunksize = (uint16_t) MIN(total, CHUNK);
assert_param(USBD_OK == CDC_Transmit_FS((uint8_t *) buff, chunksize));
// this is an attempt to speed it up a little by removing a couple levels of indirection
assert_param(HAL_OK == HAL_PCD_EP_Transmit(hUsbDeviceFS.pData, CDC_IN_EP, (uint8_t *) buff, chunksize));
// USBD_LL_Transmit(&hUsbDeviceFS, CDC_IN_EP, (uint8_t *) buff, chunksize);
// assert_param(USBD_OK == CDC_Transmit_FS((uint8_t *) buff, chunksize));
buff += chunksize; buff += chunksize;
total -= chunksize; total -= chunksize;

Loading…
Cancel
Save