| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
AudioInput.c File Reference
`#include "AudioInput.h"`

Go to the source code of this file.

## Macros
#define | AUDIO_MAX_SAMPLE_FREQ 48000

## Functions
PRAGMA_ALIGN_4 uint16_t sample_buffer[512] | ATTR_ALIGNED (4)
void | Audio_Reset_Data_Buffer (void)
void | Audio_Init (uint32_t samplefreq)
uint32_t | CALLBACK_HAL_GetISOBufferAddress (const uint32_t EPNum, uint32_t *packet_size)
int | main (void)
| Main program body.
void | EVENT_USB_Device_Connect (void)
| USB Device connect event callback.
void | EVENT_USB_Device_Disconnect (void)
| USB Device disconnect event callback.
void | EVENT_USB_Device_ConfigurationChanged (void)
| USB Device configuration change event callback.
void | EVENT_USB_Device_ControlRequest (void)
| USB Device control request receive event callback.
bool | CALLBACK_Audio_Device_GetSetEndpointProperty (USB_ClassInfo_Audio_Device_t *const AudioInterfaceInfo, const uint8_t EndpointProperty, const uint8_t EndpointAddress, const uint8_t EndpointControl, uint16_t *const DataLength, uint8_t *Data)
bool | CALLBACK_Audio_Device_GetSetInterfaceProperty (USB_ClassInfo_Audio_Device_t *const AudioInterfaceInfo, const uint8_t Property, const uint8_t EntityAddress, const uint16_t Parameter, uint16_t *const DataLength, uint8_t *Data)

## Variables
USB_ClassInfo_Audio_Device_t | Microphone_Audio_Interface
uint32_t | CurrentAudioSampleFrequency = AUDIO_MAX_SAMPLE_FREQ

## Macro Definition Documentation

#define AUDIO_MAX_SAMPLE_FREQ 48000

Max Sample Frequency.

Definition at line 58 of file AudioInput.c.

## Function Documentation

PRAGMA_ALIGN_4 uint16_t sample_buffer [512] ATTR_ALIGNED | ( | 4 |  | ) |

Definition at line 64 of file AudioInput.c.

void Audio_Init | ( | uint32_t | samplefreq | ) |

Definition at line 87 of file AudioInput.c.

void Audio_Reset_Data_Buffer | ( | void |  | ) |

Definition at line 84 of file AudioInput.c.

bool CALLBACK_Audio_Device_GetSetInterfaceProperty | ( | USB_ClassInfo_Audio_Device_t *const | AudioInterfaceInfo,
|  | const uint8_t | Property,
|  | const uint8_t | EntityAddress,
|  | const uint16_t | Parameter,
|  | uint16_t *const | DataLength,
|  | uint8_t * | Data
| ) |  |

Audio class driver callback for the setting and retrieval of streaming interface properties. This callback must be implemented in the user application to handle property manipulations on streaming audio interfaces.

Definition at line 211 of file AudioInput.c.

uint32_t CALLBACK_HAL_GetISOBufferAddress | ( | const uint32_t | EPNum,
|  | uint32_t * | packet_size
| ) |  |

This callback function provides iso buffer address for HAL iso transfer processing. for ISO In EP, this function also returns the size of buffer, depend on SampleFrequency.

Definition at line 96 of file AudioInput.c.

## Variable Documentation

uint32_t CurrentAudioSampleFrequency = AUDIO_MAX_SAMPLE_FREQ

Current audio sampling frequency of the streaming audio endpoint.

Definition at line 60 of file AudioInput.c.

USB_ClassInfo_Audio_Device_t Microphone_Audio_Interface

Initial value:
= {
.Config = {
.StreamingInterfaceNumber = 1,
.DataINEndpointNumber = AUDIO_STREAM_EPNUM,
.DataINEndpointSize = AUDIO_STREAM_EPSIZE,
.PortNumber = 0,
},
}

Audio Class driver interface configuration and state information. This structure is passed to all Audio Class driver functions, so that multiple instances of the same class within a device can be differentiated from one another.

Definition at line 47 of file AudioInput.c.