Sonochan II 0.1

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

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
host_audio_task.c File Reference

Management of the USB host mouse HID task. More...

`#include "conf_usb.h"`
`#include "debug.h"`
`#include "board.h"`
`#include "usb_drv.h"`
`#include "usb_host_enum.h"`
`#include "usb_host_task.h"`
`#include "usb_audio.h"`
`#include "host_audio_task.h"`
`#include <stdio.h>`
`#include "pwm_dac.h"`
`#include "pm.h"`
`#include "usb_stream_control.h"`

## Macros
#define | MAX_FEATURE_UNITS 3

## Functions
void | host_audio_task_init (void)
| This function initializes the host mouse HID task. More...
void | host_audio_task (void)
| This function manages the host mouse HID task. More...
void | host_audio_set_cur_mute (U16 unit, Bool cs_mute)
| This function controls the Mute feature of a particular unit. More...
void | host_audio_set_cur (U16 unit, U16 channel_number, U16 cur)
| This function set the 'current setting' feature of a particular unit. More...
U16 | host_audio_get_max (U16 unit, U16 channel_number)
| This function returns the 'MAX setting' feature of a particular unit. More...
void | host_set_sampling_rate (U16 endpoint, U32 sampling_rate)
| This function selects one of the sampling rate of the streaming interface. More...

## Variables
pm_freq_param_t | pm_freq_param
volatile U8 | audio_cpt_sof
volatile cs_feature_unit_t | g_cs_feature [MAX_FEATURE_UNITS]
volatile U8 | g_cs_num_features_unit =0
volatile U32 | g_sample_freq [MAX_INTERFACE_SUPPORTED]
volatile U8 | g_n_channels [MAX_INTERFACE_SUPPORTED]
volatile U8 | g_n_bits_per_sample [MAX_INTERFACE_SUPPORTED]
U16 | byte_count =0
U8 | pipe_audio_in
U8 | interf_audio_stream
volatile Bool | audio_new_device_connected
volatile Bool | audio_connected

## Detailed Description

Management of the USB host mouse HID task.

This file manages the USB host mouse HID task.

- Compiler: IAR EWAVR32 and GNU GCC for AVR32
- Supported devices: All AVR32 devices with a USB module can be used.
- AppNote:

Author
  Atmel Corporation: http://www.atmel.com
  Support and FAQ: http://support.atmel.no/

## Macro Definition Documentation

#define MAX_FEATURE_UNITS 3

Define for each 'feature unit' the max numbers of bmaControls One of them is used by the microphone!

## Function Documentation

U16 host_audio_get_max | ( | U16 | unit,
|  | U16 | channel_number
| ) |  |

This function returns the 'MAX setting' feature of a particular unit.

void host_audio_set_cur | ( | U16 | unit,
|  | U16 | channel_number,
|  | U16 | cur
| ) |  |

This function set the 'current setting' feature of a particular unit.

void host_audio_set_cur_mute | ( | U16 | unit,
|  | Bool | cs_mute
| ) |  |

This function controls the Mute feature of a particular unit.

void host_audio_task | ( | void | ) |  |

This function manages the host mouse HID task.

void host_audio_task_init | ( | void | ) |  |

This function initializes the host mouse HID task.

void host_set_sampling_rate | ( | U16 | endpoint,
|  | U32 | sampling_rate
| ) |  |

This function selects one of the sampling rate of the streaming interface.

## Variable Documentation

volatile Bool audio_connected

volatile U8 audio_cpt_sof

volatile Bool audio_new_device_connected

U16 byte_count =0

volatile cs_feature_unit_t g_cs_feature[MAX_FEATURE_UNITS]

volatile U8 g_cs_num_features_unit =0

volatile U8 g_n_bits_per_sample[MAX_INTERFACE_SUPPORTED]

volatile U8 g_n_channels[MAX_INTERFACE_SUPPORTED]

volatile U32 g_sample_freq[MAX_INTERFACE_SUPPORTED]

U8 interf_audio_stream

U8 pipe_audio_in

pm_freq_param_t pm_freq_param