2021-08-04 02:32:40 +00:00
|
|
|
// Copyright 2015-2021 Rob Riggs <rob@mobilinkd.com>
|
2018-07-30 02:34:53 +00:00
|
|
|
// All rights reserved.
|
|
|
|
|
2021-08-04 02:32:40 +00:00
|
|
|
#pragma once
|
2018-07-30 02:34:53 +00:00
|
|
|
|
|
|
|
#include "arm_math.h"
|
|
|
|
#include "cmsis_os.h"
|
2018-08-06 00:21:52 +00:00
|
|
|
#include "stm32l4xx_hal.h"
|
2018-07-30 02:34:53 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern osMessageQId audioInputQueueHandle;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2018-08-06 00:21:52 +00:00
|
|
|
constexpr const uint32_t AUDIO_IN = ADC_CHANNEL_8;
|
2018-07-30 02:34:53 +00:00
|
|
|
|
|
|
|
namespace mobilinkd { namespace tnc { namespace audio {
|
|
|
|
|
|
|
|
void init_log_volume();
|
|
|
|
void autoAudioInputLevel();
|
|
|
|
void setAudioInputLevels();
|
|
|
|
void setAudioOutputLevel();
|
|
|
|
|
|
|
|
extern bool streamInputDCOffset;
|
2021-01-03 03:59:59 +00:00
|
|
|
constexpr const uint16_t vref = 4095; // Must match ADC output (adjust when oversampling)
|
2021-08-04 02:32:40 +00:00
|
|
|
extern int16_t virtual_ground;
|
2018-08-06 00:21:52 +00:00
|
|
|
extern float i_vgnd;
|
2018-07-30 02:34:53 +00:00
|
|
|
|
|
|
|
}}} // mobilinkd::tnc::audio
|