Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4efa5ddaa
|
+1
-1
@@ -109,7 +109,7 @@ extern uint32_t SystemCoreClock;
|
|||||||
#define configQUEUE_REGISTRY_SIZE 0
|
#define configQUEUE_REGISTRY_SIZE 0
|
||||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||||
#define configENABLE_BACKWARD_COMPATIBILITY 0
|
#define configENABLE_BACKWARD_COMPATIBILITY 0
|
||||||
#define configUSE_COUNTING_SEMAPHORES 1
|
#define configUSE_COUNTING_SEMAPHORES 0
|
||||||
|
|
||||||
#define configUSE_TIMERS 0
|
#define configUSE_TIMERS 0
|
||||||
#define configTIMER_TASK_PRIORITY TSK_TIMERS_PRIO // above normal
|
#define configTIMER_TASK_PRIORITY TSK_TIMERS_PRIO // above normal
|
||||||
|
|||||||
@@ -29,12 +29,10 @@ 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);
|
||||||
|
|
||||||
// this is an attempt to speed it up a little by removing a couple levels of indirection
|
// 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));
|
// assert_param(HAL_OK == HAL_PCD_EP_Transmit(hUsbDeviceFS.pData, CDC_IN_EP, (uint8_t *) buff, chunksize));
|
||||||
|
|
||||||
HAL_PCD_EP_Transmit(hUsbDeviceFS.pData, CDC_IN_EP, (uint8_t *) "AAAAHELLODOLLY123", 17);
|
|
||||||
|
|
||||||
// USBD_LL_Transmit(&hUsbDeviceFS, 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));
|
assert_param(USBD_OK == CDC_Transmit_FS((uint8_t *) buff, chunksize));
|
||||||
|
|
||||||
buff += chunksize;
|
buff += chunksize;
|
||||||
total -= chunksize;
|
total -= chunksize;
|
||||||
|
|||||||
+1
-1
@@ -313,7 +313,7 @@ void USBD_CDC_TransmitDone(USBD_HandleTypeDef *pdev)
|
|||||||
assert_param(semVcomTxReadyHandle != NULL);
|
assert_param(semVcomTxReadyHandle != NULL);
|
||||||
assert_param(inIRQ());
|
assert_param(inIRQ());
|
||||||
|
|
||||||
// if (uxSemaphoreGetCount(semVcomTxReadyHandle) == 2) return;
|
if (uxSemaphoreGetCount(semVcomTxReadyHandle) == 1) return;
|
||||||
|
|
||||||
portBASE_TYPE taskWoken = pdFALSE;
|
portBASE_TYPE taskWoken = pdFALSE;
|
||||||
assert_param(xSemaphoreGiveFromISR(semVcomTxReadyHandle, &taskWoken) == pdTRUE);
|
assert_param(xSemaphoreGiveFromISR(semVcomTxReadyHandle, &taskWoken) == pdTRUE);
|
||||||
|
|||||||
+1
-12
@@ -47,13 +47,12 @@
|
|||||||
******************************************************************************
|
******************************************************************************
|
||||||
*/
|
*/
|
||||||
/* Includes ------------------------------------------------------------------*/
|
/* Includes ------------------------------------------------------------------*/
|
||||||
#include <platform/hw_utils.h>
|
#include <utils/malloc_safe.h>
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "usbd_def.h"
|
#include "usbd_def.h"
|
||||||
#include "usbd_core.h"
|
#include "usbd_core.h"
|
||||||
#include "usbd_msc.h"
|
#include "usbd_msc.h"
|
||||||
#include "usbd_cdc.h"
|
#include "usbd_cdc.h"
|
||||||
#include "utils/malloc_safe.h"
|
|
||||||
/* Private typedef -----------------------------------------------------------*/
|
/* Private typedef -----------------------------------------------------------*/
|
||||||
/* Private define ------------------------------------------------------------*/
|
/* Private define ------------------------------------------------------------*/
|
||||||
/* Private macro -------------------------------------------------------------*/
|
/* Private macro -------------------------------------------------------------*/
|
||||||
@@ -336,9 +335,6 @@ void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd)
|
|||||||
* @param pdev: Device handle
|
* @param pdev: Device handle
|
||||||
* @retval USBD Status
|
* @retval USBD Status
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern void PCD_WritePMA(USB_TypeDef *USBx, uint8_t *pbUsrBuf, uint16_t wPMABufAddr, uint16_t wNBytes);
|
|
||||||
|
|
||||||
USBD_StatusTypeDef USBD_LL_Init (USBD_HandleTypeDef *pdev)
|
USBD_StatusTypeDef USBD_LL_Init (USBD_HandleTypeDef *pdev)
|
||||||
{
|
{
|
||||||
#if PLAT_USB_OTGFS
|
#if PLAT_USB_OTGFS
|
||||||
@@ -405,8 +401,6 @@ USBD_StatusTypeDef USBD_LL_Init (USBD_HandleTypeDef *pdev)
|
|||||||
|
|
||||||
buf1addr = (ptr += 64);
|
buf1addr = (ptr += 64);
|
||||||
buf2addr = (ptr += 64);
|
buf2addr = (ptr += 64);
|
||||||
|
|
||||||
uint32_t addr_begin = buf1addr;
|
|
||||||
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , CDC_IN_EP , PCD_DBL_BUF, buf1addr | (buf2addr << 16)); // 64
|
HAL_PCDEx_PMAConfig((PCD_HandleTypeDef*)pdev->pData , CDC_IN_EP , PCD_DBL_BUF, buf1addr | (buf2addr << 16)); // 64
|
||||||
|
|
||||||
buf1addr = (ptr += 64);
|
buf1addr = (ptr += 64);
|
||||||
@@ -417,11 +411,6 @@ USBD_StatusTypeDef USBD_LL_Init (USBD_HandleTypeDef *pdev)
|
|||||||
(void)ptr;
|
(void)ptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint8_t buf[256] = {};
|
|
||||||
PCD_WritePMA(((PCD_HandleTypeDef*)pdev->pData)->Instance, (uint8_t *) &buf[0], (uint16_t) addr_begin, 256);
|
|
||||||
|
|
||||||
hw_configure_sparse_pins('B', 0b111, NULL, LL_GPIO_MODE_OUTPUT, LL_GPIO_OUTPUT_PUSHPULL);
|
|
||||||
|
|
||||||
return USBD_OK;
|
return USBD_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user