correct midi for stm32f051
This commit is contained in:
parent
9255d8d7e1
commit
4a3aaa1a0e
1 changed files with 3 additions and 1 deletions
|
@ -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<FULL_LEN; n++) buffer[n] = MAXPWM >> 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;
|
||||
|
|
Loading…
Reference in a new issue