Skip to content

File ns_pdm.c

FileList > apollo4 > ns_pdm.c

Go to the source code of this file

Driver for Ambiq PDM Microphone interface. More...

  • #include "../ns_pdm.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
ns_pdm_cfg_t ns_pdm_default = = {
.clock = NS_CLKSEL_HFRC,
.clock_freq = NS_AUDIO_PDM_CLK_750KHZ,
.mic = NS_AUDIO_PDM_MICBOARD_0,
.numBytes = NS_AUDIO_PDM_SAMPLE_16BIT,
}

Public Static Attributes

Type Name
const IRQn_Type g_ePdmInterrupts = = {PDM0_IRQn, PDM1_IRQn, PDM2_IRQn, PDM3_IRQn}
void * pvPDMHandle

Public Functions

Type Name
void am_pdm0_isr (void)
void am_pdm1_isr (void)
void am_pdm2_isr (void)
void am_pdm_isr_common (uint8_t pdmNumber)
void pdm_deinit (ns_audio_config_t * config)
uint32_t pdm_init (ns_audio_config_t * config)
AUDADC subsystem init - should only be invoked by ns_audio, not directly.
void pdm_trigger_dma (ns_audio_config_t * config)

Detailed Description

Author:

Ambiq

Version:

0.1

Date:

2023-05-17

Copyright:

Copyright (c) 2023

Public Attributes Documentation

variable ns_pdm_default

ns_pdm_cfg_t ns_pdm_default;

Public Static Attributes Documentation

variable g_ePdmInterrupts

const IRQn_Type g_ePdmInterrupts[];

variable pvPDMHandle

void* pvPDMHandle;

Public Functions Documentation

function am_pdm0_isr

void am_pdm0_isr (
    void
) 

function am_pdm1_isr

void am_pdm1_isr (
    void
) 

function am_pdm2_isr

void am_pdm2_isr (
    void
) 

function am_pdm_isr_common

void am_pdm_isr_common (
    uint8_t pdmNumber
) 

function pdm_deinit

void pdm_deinit (
    ns_audio_config_t * config
) 

function pdm_init

uint32_t pdm_init (
    ns_audio_config_t * config
) 

function pdm_trigger_dma

void pdm_trigger_dma (
    ns_audio_config_t * config
) 

The documentation for this class was generated from the following file neuralSPOT/neuralspot/ns-audio/src/apollo4/ns_pdm.c