diff --git a/V203/ch32v203/gpio.h b/V203/ch32v203/gpio.h index c34955e..b26d00e 100644 --- a/V203/ch32v203/gpio.h +++ b/V203/ch32v203/gpio.h @@ -24,7 +24,7 @@ class GpioClass { GPIOA_Type & port; const uint32_t pin; public: - explicit constexpr GpioClass (GPIOA_Type & _port, const uint32_t _pin, const uint32_t _mode = GPIO_AI_PPO | GPIO_Speed_10MHz) noexcept + explicit GpioClass (GPIOA_Type & _port, const uint32_t _pin, const uint32_t _mode = GPIO_AI_PPO | GPIO_Speed_10MHz) noexcept : port(_port), pin(_pin) { /* Zapneme vše, ono je to dost jedno. */ RCC.APB2PCENR.modify([](RCC_Type::APB2PCENR_DEF & r)->auto { diff --git a/V203/usb/ch32v203/cdc_class.cpp b/V203/usb/ch32v203/cdc_class.cpp index 15bd127..013412c 100644 --- a/V203/usb/ch32v203/cdc_class.cpp +++ b/V203/usb/ch32v203/cdc_class.cpp @@ -1,6 +1,6 @@ #include "cdc_class.h" #include "system.h" -#include "project_config.h" +// #include "project_config.h" typedef __SIZE_TYPE__ size_t; /* Only one instance of this class ! */ static cdc_class * pInstance = nullptr; @@ -98,11 +98,11 @@ void cdc_class::USBFS_Device_Init( bool sta ) { USBFSD->BASE_CTRL = 0x00; NVIC.DisableIRQ( USBFS_IRQn ); } - dtr << LED_OFF; + // dtr << LED_OFF; } cdc_class::cdc_class() noexcept : BaseLayer(), - CtrlIface(nullptr), dtr (DTR_LED), TxRing(), Ready(false), LineCoding() { + CtrlIface(nullptr), /*dtr (DTR_LED),*/ TxRing(), Ready(false), LineCoding() { pInstance = this; USBFS_DevConfig = 0; USBFS_DevAddr = 0; @@ -247,8 +247,10 @@ union DtrRts { if (CtrlIface) CtrlIface->IOCtrl(USB_USART_SET_DTR_RTS, tmp.bytes, 2); const bool b = USBFS_SetupReqValue & 1; Ready = b; + /* if (b) dtr << LED_ON; else dtr << LED_OFF; + */ } break; case CDC_SEND_BREAK: diff --git a/V203/usb/ch32v203/cdc_class.h b/V203/usb/ch32v203/cdc_class.h index 7dae761..80499ab 100644 --- a/V203/usb/ch32v203/cdc_class.h +++ b/V203/usb/ch32v203/cdc_class.h @@ -37,7 +37,7 @@ static_assert (DEF_UEP_NUM == 8, "Number endpoints fail"); */ class cdc_class : public BaseLayer { CDC_CtrlInterface * CtrlIface; - GpioClass dtr; + // GpioClass dtr; FIFO TxRing; volatile bool Ready; USB_CDC_LineCoding LineCoding; diff --git a/V203/usb/ch32v203/gpio.h b/V203/usb/ch32v203/gpio.h index cd669df..610c8a0 100644 --- a/V203/usb/ch32v203/gpio.h +++ b/V203/usb/ch32v203/gpio.h @@ -24,7 +24,7 @@ class GpioClass { GPIOA_Type & port; const uint32_t pin; public: - explicit constexpr GpioClass (GPIOA_Type & _port, const uint32_t _pin, const uint32_t _mode = GPIO_AI_PPO | GPIO_Speed_10MHz) noexcept + explicit GpioClass (GPIOA_Type & _port, const uint32_t _pin, const uint32_t _mode = GPIO_AI_PPO | GPIO_Speed_10MHz) noexcept : port(_port), pin(_pin) { /* Zapneme vše, ono je to dost jedno. */ RCC.APB2PCENR.modify([](RCC_Type::APB2PCENR_DEF & r)->auto { diff --git a/V203/usb/usart/project_config.h b/V203/usb/usart/project_config.h deleted file mode 100644 index 9bdeb8e..0000000 --- a/V203/usb/usart/project_config.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _PROJECT_CONFIG_H_ -#define _PROJECT_CONFIG_H_ -#define DEVEL_KIT -#ifdef DEVEL_KIT -#define DTR_LED GPIOA,0 -#define DRQ_LED GPIOA,1 -#define LED_ON false -#define LED_OFF true -#else -#define DTR_LED GPIOB,5 -#define DRQ_LED GPIOB,4 -#define LED_ON true -#define LED_OFF false -#endif -#endif // _PROJECT_CONFIG_H_