#include <stdio.h>
#include "usart.h"
#include "conf_usb.h"
#include "board.h"
#include "controller.h"
#include "usb_drv.h"
#include "usb_descriptors.h"
#include "usb_standard_request.h"
#include "device_audio_task.h"
#include "usb_stream_player.h"
#include "audio_example.h"
#include "et024006dhu.h"
#include "cycle_counter.h"
#include "debug.h"
#include "avr32_logo.h"
#include "microphone_samples.h"
Macros | |
#define | FONT_HEIGHT 14 |
#define | START_Y_DEMO_TEXT 33 |
#define | TIMER_MMI 1000 |
#define | TIMER_STARTUP 100 |
Functions | |
void | device_audio_task (void) |
Entry point of the device Audio task management. More... | |
void | device_audio_task_init (void) |
This function initializes the hardware/software resources required for device Audio task. More... | |
static void | display_box (uint32_t x, uint32_t y, uint32_t size_x, uint32_t size_y, uint16_t color, uint16_t edge_color) |
This function displays a box on the LCD. More... | |
static void | mmi_activity_display (bool init, uint32_t fifo_cnt) |
This function displays the a bargraph indicating the state of the audio buffers and the PPM deviation between the incoming USB audio sampling frequency and the output DAC sampling frequency. More... | |
static void | mmi_display (void) |
This function displays the MMI interface and some static informations. More... | |
void | usb_sof_action (void) |
usb_sof_action More... | |
Variables | |
uint8_t * | __bss_start |
uint8_t * | _data |
uint8_t * | _edata |
uint8_t * | _estack |
uint8_t * | _stack |
static uint32_t | dat_sample_index |
device_audio_task_data_t * | device_audio_task_data = NULL |
uint8_t * | end |
static uint32_t | mmi_state =0 |
bool | mute |
Public : (bit) mute mute is set to true when ACTIVE mute is set to false otherwise /. More... | |
static uint16_t | sof_cnt |
t_cpu_time | timer |
int16_t | volume |
Public : (int16_t) volume volume represents the current volume of audio stream /. More... | |
#define FONT_HEIGHT 14 |
Referenced by mmi_activity_display(), and mmi_display().
#define START_Y_DEMO_TEXT 33 |
Referenced by mmi_activity_display(), and mmi_display().
#define TIMER_MMI 1000 |
Referenced by mmi_activity_display().
#define TIMER_STARTUP 100 |
Referenced by mmi_display().
void device_audio_task | ( | void | ) |
Entry point of the device Audio task management.
References audio_mixer_dacs_input, dat_sample_index, EP_AUDIO_IN, EP_AUDIO_OUT, EP_SIZE_IN, Is_device_enumerated, is_joystick_pressed(), Is_usb_out_received, Is_usb_write_enabled, LED0, LED_On(), LED_Set_Intensity(), mmi_activity_display(), mmi_display(), mmi_state, mute, sample_sound, SAMPLE_SOUND_LEN, Usb_ack_in_ready_send, Usb_ack_out_received_free, Usb_reset_endpoint_fifo_access, USB_STREAM_DEVICE, usb_stream_input(), usb_stream_resync(), and Usb_write_endpoint_data.
Referenced by device_audio_task_init(), and main().
void device_audio_task_init | ( | void | ) |
This function initializes the hardware/software resources required for device Audio task.
References dat_sample_index, device_audio_task(), Is_usb_device, player_init(), sof_cnt, SPEAKER_FREQUENCY, Usb_enable_sof_interrupt, and usb_stream_init().
Referenced by main().
|
static |
This function displays a box on the LCD.
References et024006_DrawFilledRect(), et024006_DrawHorizLine(), and et024006_DrawVertLine().
Referenced by mmi_activity_display().
|
static |
This function displays the a bargraph indicating the state of the audio buffers and the PPM deviation between the incoming USB audio sampling frequency and the output DAC sampling frequency.
References BLACK, BLUE, BLUE_LEV, cpu_is_timeout(), cpu_ms_2_cy(), cpu_set_timeout(), display_box(), et024006_DrawFilledRect(), et024006_PrintString(), FCPU_HZ, FONT8x8, FONT_HEIGHT, get_heap_curr_used_size(), get_heap_free_size(), get_heap_total_used_size(), START_Y_DEMO_TEXT, TIMER_MMI, USB_STREAM_BUFFER_NUMBER, usb_stream_ppm_get(), and WHITE.
Referenced by device_audio_task(), and mmi_display().
|
static |
This function displays the MMI interface and some static informations.
References __bss_start, _data, _edata, _estack, _stack, AUDIO_DEMO_STRING, avr32_logo, AVR32_LOGO_HEIGHT, AVR32_LOGO_WIDTH, BLACK, BLUE, cpu_is_timeout(), cpu_ms_2_cy(), cpu_set_timeout(), cpu_stop_timeout(), end, et024006_DrawFilledRect(), ET024006_HEIGHT, et024006_PrintString(), et024006_PutPixmap(), ET024006_WIDTH, FCPU_HZ, FONT8x16, FONT8x8, FONT_HEIGHT, LED0, LED1, LED2, LED3, LED_Off(), LED_On(), mmi_activity_display(), mmi_state, SPEAKER_FREQUENCY, START_Y_DEMO_TEXT, TIMER_STARTUP, and WHITE.
Referenced by device_audio_task().
uint8_t* __bss_start |
Referenced by mmi_display().
uint8_t* _data |
Referenced by mmi_display().
uint8_t* _edata |
Referenced by mmi_display().
uint8_t* _estack |
Referenced by mmi_display().
uint8_t* _stack |
Referenced by mmi_display().
|
static |
Referenced by device_audio_task(), and device_audio_task_init().
device_audio_task_data_t* device_audio_task_data = NULL |
uint8_t* end |
Referenced by mmi_display().
|
static |
Referenced by device_audio_task(), and mmi_display().
bool mute |
Public : (bit) mute mute is set to true when ACTIVE mute is set to false otherwise /.
Referenced by device_audio_task().
|
static |
Referenced by device_audio_task_init(), and usb_sof_action().
t_cpu_time timer |
Referenced by cpu_delay_cy(), cpu_delay_ms(), and cpu_delay_us().
int16_t volume |
Public : (int16_t) volume volume represents the current volume of audio stream /.
Referenced by audio_mixer_dacs_get_volume_direct(), tpa6130_dac_decrease_volume(), tpa6130_dac_increase_volume(), tpa6130_dac_mute(), tpa6130_set_volume(), and volume_usb_to_appli().