From 4a3aaa1a0e5fec49f6fbd54594d5757af5534229 Mon Sep 17 00:00:00 2001 From: Kizarm Date: Sat, 9 Mar 2024 12:20:35 +0100 Subject: [PATCH] correct midi for stm32f051 --- stm32f051/pcmdma.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stm32f051/pcmdma.cpp b/stm32f051/pcmdma.cpp index 9e6e38a..6118c02 100644 --- a/stm32f051/pcmdma.cpp +++ b/stm32f051/pcmdma.cpp @@ -31,6 +31,8 @@ static void Dma1Ch5Init (void * addr) { static PcmDma * PcmDmaInstance = nullptr; PcmDma::PcmDma() noexcept : pL(buffer), pH(buffer + HALF_LEN) { PcmDmaInstance = this; + const GpioClass de (GpioPortA, 12); + de << true; // použitý hardware používá jako budič sluchátek 75176 (RS485), nutno vybavit for (unsigned n=0; n> 1; GpioClass pin1p (GpioPortA, 9, GPIO_Mode_AF); GpioClass pin1n (GpioPortB, 0, GPIO_Mode_AF); @@ -57,7 +59,7 @@ PcmDma::PcmDma() noexcept : pL(buffer), pH(buffer + HALF_LEN) { }); // Set Output, dead time TIM1.BDTR.modify([](TIM1_Type::BDTR_DEF & r) -> auto { - r.B.DTG = 48u; // dead: 1 us + //r.B.DTG = 48u; // dead: 1 us r.B.MOE = SET; // Main output enable //r.B.OSSR = 1u; // Off-state selection for Run mode - TODO return r.R;