diff --git a/V203/usb/ch32v203/usart.cpp b/V203/usb/ch32v203/usart.cpp index 30c17a8..5f168eb 100644 --- a/V203/usb/ch32v203/usart.cpp +++ b/V203/usb/ch32v203/usart.cpp @@ -69,6 +69,7 @@ uint32_t Usart::Down(const char * data, const uint32_t len) { return n; } void Usart::SetBaud (const uint32_t _baud) const { + if (_baud == 0u) return; // ! zero divide const ONE_BIT b = USART1.CTLR1.B.UE; if (b == SET) USART1.CTLR1.B.UE = RESET; const uint32_t HCLK = SystemCoreClock; // hodiny pro USART zde nejsou děleny