File ns_audadc.c
FileList > apollo4 > ns_audadc.c
Go to the source code of this file
#include "../ns_audadc.h"
#include "am_bsp.h"
#include "am_mcu_apollo.h"
#include "am_util.h"
#include "ns_audio.h"
#include "ns_core.h"
Public Attributes
Type | Name |
---|---|
AUDADC_Type * | g_adc |
MCUCTRL_Type * | g_mcuctrl |
am_hal_audadc_dma_config_t | g_sAUDADCDMAConfig |
am_hal_audadc_gain_config_t | g_sAudadcGainConfig = = { |
.ui32LGA = 0, | |
.ui32HGADELTA = 0, | |
.ui32LGB = 0, | |
.ui32HGBDELTA = 0, | |
.eUpdateMode = AM_HAL_AUDADC_GAIN_UPDATE_IMME, | |
} |
|
ns_audadc_cfg_t | ns_audadc_default = = { |
.clock = NS\_CLKSEL\_HFRC2\_ADJ,
.low\_power\_mode = true,
.repeating\_trigger\_mode = true,
.dcmp\_enable = false,
}
|
| ns_audadc_cfg_t | ns_audadc_vos_default = = {
.clock = NS_CLKSEL_HFRC2_ADJ,
.low_power_mode = true,
.repeating_trigger_mode = false,
.dcmp_enable = false,
}
|
Public Static Attributes
Type | Name |
---|---|
uint32_t | axiScratchBuf |
void * | g_AUDADCHandle |
volatile bool | g_bAUDADCDMAError |
Public Functions
Type | Name |
---|---|
void | am_audadc0_isr (void) |
uint32_t | audadc_config (ns_audadc_cfg_t * cfg) Configure and enable the AUDADC. |
void | audadc_deinit (ns_audio_config_t * cfg) |
uint32_t | audadc_init (ns_audio_config_t * cfg) |
uint32_t | audadc_slot_config (ns_audio_config_t * cfg) |
Public Static Functions
Type | Name |
---|---|
void | audadc_config_dma (ns_audio_config_t * cfg) |
void | audadc_pga_init (ns_audio_config_t * cfg) |
Macros
Type | Name |
---|---|
define | CH_A0_GAIN_DB 18 |
define | CH_A1_GAIN_DB 18 |
define | CH_B0_GAIN_DB 12 |
define | CH_B1_GAIN_DB 12 |
define | CLK_SRC HFRC |
define | HFRC 1 |
define | HFRC2 2 |
define | HFRC2_ADJ 3 |
define | PREAMP_FULL_GAIN 24 |
define | XTHS 0 |
Public Attributes Documentation
variable g_adc
AUDADC_Type* g_adc;
variable g_mcuctrl
MCUCTRL_Type* g_mcuctrl;
variable g_sAUDADCDMAConfig
am_hal_audadc_dma_config_t g_sAUDADCDMAConfig;
variable g_sAudadcGainConfig
am_hal_audadc_gain_config_t g_sAudadcGainConfig;
variable ns_audadc_default
ns_audadc_cfg_t ns_audadc_default;
variable ns_audadc_vos_default
ns_audadc_cfg_t ns_audadc_vos_default;
Public Static Attributes Documentation
variable axiScratchBuf
uint32_t axiScratchBuf[20];
variable g_AUDADCHandle
void* g_AUDADCHandle;
variable g_bAUDADCDMAError
volatile bool g_bAUDADCDMAError;
Public Functions Documentation
function am_audadc0_isr
void am_audadc0_isr (
void
)
function audadc_config
Configure and enable the AUDADC.
uint32_t audadc_config (
ns_audadc_cfg_t * cfg
)
Parameters:
cfg
- AUDADC-specific configuration
Returns:
uint32_t status
function audadc_deinit
void audadc_deinit (
ns_audio_config_t * cfg
)
function audadc_init
uint32_t audadc_init (
ns_audio_config_t * cfg
)
function audadc_slot_config
uint32_t audadc_slot_config (
ns_audio_config_t * cfg
)
Public Static Functions Documentation
function audadc_config_dma
static void audadc_config_dma (
ns_audio_config_t * cfg
)
function audadc_pga_init
static void audadc_pga_init (
ns_audio_config_t * cfg
)
Macro Definition Documentation
define CH_A0_GAIN_DB
#define CH_A0_GAIN_DB 18
define CH_A1_GAIN_DB
#define CH_A1_GAIN_DB 18
define CH_B0_GAIN_DB
#define CH_B0_GAIN_DB 12
define CH_B1_GAIN_DB
#define CH_B1_GAIN_DB 12
define CLK_SRC
#define CLK_SRC HFRC
define HFRC
#define HFRC 1
define HFRC2
#define HFRC2 2
define HFRC2_ADJ
#define HFRC2_ADJ 3
define PREAMP_FULL_GAIN
#define PREAMP_FULL_GAIN 24
define XTHS
#define XTHS 0
The documentation for this class was generated from the following file neuralSPOT/neuralspot/ns-audio/src/apollo4/ns_audadc.c