Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
wiced_hal_mic.h File Reference

List of parameters and defined functions needed to access the Microphone Driver. More...

Data Structures

struct  wiced_hal_mic_rx_pcm_t
 Data associated with WICED_HAL_MIC_EVENT_RX_PCM. More...
 
union  wiced_hal_mic_event_data_t
 Union of data associated with Microphone events. More...
 

Macros

#define WICED_HAL_MIC_FIFO_STATUS_OK   0x00
 Microphone Fifo Status. More...
 
#define WICED_HAL_MIC_FIFO_STATUS_OVERLAP   0x01
 
#define WICED_HAL_MIC_FIFO_STATUS_FULL   0x02
 

Typedefs

typedef UINT8 wiced_hal_mic_fifo_status_t
 
typedef void( wiced_hal_mic_callback_t )(wiced_hal_mic_event_t event, wiced_hal_mic_event_data_t *p_data)
 Microphone Callback function type wiced_hal_mic_callback_t. More...
 

Enumerations

enum  wiced_hal_mic_event_t { WICED_HAL_MIC_EVENT_RX_PCM = 0 }
 Microphone Events. More...
 
enum  wiced_hal_mic_type_t { WICED_HAL_MIC_PDM = 0 }
 Microphone types. More...
 

Functions

wiced_result_t wiced_hal_mic_init (wiced_hal_mic_callback_t *p_callback, wiced_hal_mic_type_t mic_type, UINT32 nb_channels)
 Function wiced_hal_mic_init. More...
 
wiced_result_t wiced_hal_mic_select_pads (UINT32 channel_1_pad, UINT8 rising_edge_1, UINT32 channel_2_pad, UINT8 rising_edge_2, UINT32 pdm_clock_pad)
 Function wiced_hal_mic_select_pads. More...
 
wiced_result_t wiced_hal_mic_start (UINT32 sample_rate, UINT32 bits_per_sample, UINT8 pga_gain)
 Function wiced_hal_mic_start. More...
 
wiced_result_t wiced_hal_mic_stop (void)
 Function wiced_hal_mic_stop. More...
 

Detailed Description

List of parameters and defined functions needed to access the Microphone Driver.

Macro Definition Documentation

#define WICED_HAL_MIC_FIFO_STATUS_OK   0x00

Microphone Fifo Status.

Microphone Fifo Error Status

Typedef Documentation

typedef void( wiced_hal_mic_callback_t)(wiced_hal_mic_event_t event, wiced_hal_mic_event_data_t *p_data)

Microphone Callback function type wiced_hal_mic_callback_t.

AIROC Microphone Event callback (registered with wiced_hal_mic_start)

Parameters
[in]eventMicrophone event received
[in]p_data: Data (pointer on union of structure) associated with the event
Returns
NONE

Enumeration Type Documentation

Microphone Events.

Microphone events received by the Microphone callback (see wiced_hal_mic_callback_t)

Microphone types.

Microphone type

Enumerator
WICED_HAL_MIC_PDM 

Digital (Pulse Density Modulation) Microphone.

Function Documentation

wiced_result_t wiced_hal_mic_init ( wiced_hal_mic_callback_t p_callback,
wiced_hal_mic_type_t  mic_type,
UINT32  nb_channels 
)

Function wiced_hal_mic_init.

This function is called for Microphone Initialization.

Parameters
[in]p_callbackMicrophone callback
[in]mic_typeMicrophone type
[in]nb_channelsNumber of Microphone channels (1 or 2)
[in]nb_buffersNumber of buffers (per channel)
Returns
Result code (see wiced_result_t)
wiced_result_t wiced_hal_mic_select_pads ( UINT32  channel_1_pad,
UINT8  rising_edge_1,
UINT32  channel_2_pad,
UINT8  rising_edge_2,
UINT32  pdm_clock_pad 
)

Function wiced_hal_mic_select_pads.

This function is called to configure the Microphone pads (pins)

Parameters
[in]channel_1_padMicrophone Channel 1 Pad
[in]channel_1_padMicrophone Channel 2 Pad
[in]channel_1_padMicrophone Clock Pad (for WICED_HAL_MIC_PDM Microphone type)
Returns
Result code (see wiced_result_t)
wiced_result_t wiced_hal_mic_start ( UINT32  sample_rate,
UINT32  bits_per_sample,
UINT8  pga_gain 
)

Function wiced_hal_mic_start.

This function is called to Start Microphone recording

Parameters
[in]sample_rateSampling Rate
[in]bits_per_sampleNumber of bits per sample
[in]gainGain
Returns
Result code (see wiced_result_t)
wiced_result_t wiced_hal_mic_stop ( void  )

Function wiced_hal_mic_stop.

This function is called to Stop Microphone recording

Returns
Result code (see wiced_result_t)