From da330b4b73af17f12a45a614ee61ebfcd0559a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 4 Mar 2018 13:19:41 +0100 Subject: [PATCH] experimental speed-up of cdc Tx --- TinyFrame/TF_Integration.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TinyFrame/TF_Integration.c b/TinyFrame/TF_Integration.c index 6985d82..6aa1b18 100644 --- a/TinyFrame/TF_Integration.c +++ b/TinyFrame/TF_Integration.c @@ -4,6 +4,7 @@ // TinyFrame integration // +#include #include "platform.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); - 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; total -= chunksize;