From 9139b19aacdee64a0b2bc43287f5cb13322a4d79 Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Sat, 2 Apr 2022 20:37:07 +0200 Subject: [PATCH] Fixed bug in MDx input stream driver causing the SPI clock line towards the DMR chip to be set as analog input when an audio stream from the RF stage was opened --- platform/drivers/audio/inputStream_MDx.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/platform/drivers/audio/inputStream_MDx.cpp b/platform/drivers/audio/inputStream_MDx.cpp index 1c033018..0481416c 100644 --- a/platform/drivers/audio/inputStream_MDx.cpp +++ b/platform/drivers/audio/inputStream_MDx.cpp @@ -30,12 +30,12 @@ using namespace miosix; -bool inUse = false; // Flag to determine if the input stream is already open. -Thread *sWaiting = 0; // Thread waiting on interrupt. -stream_sample_t *bufAddr = 0; // Start address of data buffer, fixed. -stream_sample_t *bufCurr = 0; // Buffer address to be returned to application. -size_t bufLen = 0; // Buffer length. -uint8_t bufMode = BUF_LINEAR; // Buffer management mode. +static bool inUse = false; // Flag to determine if the input stream is already open. +static Thread *sWaiting = 0; // Thread waiting on interrupt. +static stream_sample_t *bufAddr = 0; // Start address of data buffer, fixed. +static stream_sample_t *bufCurr = 0; // Buffer address to be returned to application. +static size_t bufLen = 0; // Buffer length. +static uint8_t bufMode = BUF_LINEAR; // Buffer management mode. void __attribute__((used)) DmaHandlerImpl() { @@ -206,7 +206,7 @@ streamId inputStream_start(const enum AudioSource source, break; case SOURCE_RTX: - gpio_setMode(GPIOC, 13, INPUT_ANALOG); + gpio_setMode(GPIOC, 3, INPUT_ANALOG); ADC2->SQR3 = 13; break;