Release 0.0.2

This commit is contained in:
2025-05-25 00:10:37 +03:00
parent f8285acc0a
commit e0c91cd704

View File

@@ -24,8 +24,6 @@ EndBSPDependencies */
/* Includes ------------------------------------------------------------------*/
#include "usbd_cdc_if.h"
extern TIM_HandleTypeDef htim2;
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
@@ -98,6 +96,11 @@ extern USBD_HandleTypeDef hUsbDeviceFS;
/* Private functions ---------------------------------------------------------*/
__weak void TEMPLATE_ReceiveUserspace(uint8_t *Buf, uint32_t *Len)
{
}
/**
* @brief TEMPLATE_Init
* Initializes the CDC media low layer
@@ -218,28 +221,7 @@ static int8_t TEMPLATE_Receive(uint8_t *Buf, uint32_t *Len)
UNUSED(Buf);
UNUSED(Len);
switch (Buf[0])
{
case ('1'):
htim2.Instance->CCR1 = 10;
break;
case ('2'):
htim2.Instance->CCR1 = 25;
break;
case ('3'):
htim2.Instance->CCR1 = 50;
break;
case ('4'):
htim2.Instance->CCR1 = 75;
break;
default:
htim2.Instance->CCR1 = 99;
break;
}
TEMPLATE_ReceiveUserspace(*Buf, *Len);
USBD_CDC_ReceivePacket(&hUsbDeviceFS);
return (USBD_OK);