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
Functions | Variables
taskAK5394A.c File Reference
`#include "usart.h"`
`#include "conf_usb.h"`
`#include <avr32/io.h>`
`#include "board.h"`
`#include "usb_drv.h"`
`#include "gpio.h"`
`#include "ssc_i2s.h"`
`#include "pm.h"`
`#include "pdca.h"`
`#include "usb_standard_request.h"`
`#include "device_audio_task.h"`
`#include "taskAK5394A.h"`

## Functions
| __attribute__ ((__interrupt__))
| The PDCA interrupt handler. More...
static void | pdca_set_irq (void)
| Init interrupt controller and register pdca_int_handler interrupt. More...
void | AK5394A_pdca_disable (void)
void | AK5394A_pdca_enable (void)
void | AK5394A_task_init (const Bool uac1)

## Variables
static const gpio_map_t | SSC_GPIO_MAP
static const pdca_channel_options_t | PDCA_OPTIONS
static const pdca_channel_options_t | SPK_PDCA_OPTIONS
volatile U32 | audio_buffer_0 [AUDIO_BUFFER_SIZE]
volatile U32 | audio_buffer_1 [AUDIO_BUFFER_SIZE]
volatile U32 | spk_buffer_0 [SPK_BUFFER_SIZE]
volatile U32 | spk_buffer_1 [SPK_BUFFER_SIZE]
volatile avr32_ssc_t * | ssc = &AVR32_SSC
volatile int | audio_buffer_in
volatile int | spk_buffer_out

## Function Documentation

__attribute__ | ( | (__interrupt__) | ) |  |

The PDCA interrupt handler.

The handler reload the PDCA settings with the correct address and size using the reload register. The interrupt will happen when the reload counter reaches 0

void AK5394A_pdca_disable | ( | void | ) |  |

void AK5394A_pdca_enable | ( | void | ) |  |

void AK5394A_task_init | ( | const Bool | uac1) |  |

static void pdca_set_irq | ( | void | ) |  |
| static

Init interrupt controller and register pdca_int_handler interrupt.

## Variable Documentation

volatile U32 audio_buffer_0[AUDIO_BUFFER_SIZE]

volatile U32 audio_buffer_1[AUDIO_BUFFER_SIZE]

volatile int audio_buffer_in

const pdca_channel_options_t PDCA_OPTIONS
| static

Initial value:
= {
.addr = (void *)audio_buffer_0,
.pid = AVR32_PDCA_PID_SSC_RX,
.size = AUDIO_BUFFER_SIZE,
.r_addr = NULL,
.r_size = 0,
.transfer_size = PDCA_TRANSFER_SIZE_WORD
}

volatile U32 spk_buffer_0[SPK_BUFFER_SIZE]

volatile U32 spk_buffer_1[SPK_BUFFER_SIZE]

volatile int spk_buffer_out

const pdca_channel_options_t SPK_PDCA_OPTIONS
| static

Initial value:
= {
.addr = (void *)spk_buffer_0,
.pid = AVR32_PDCA_PID_SSC_TX,
.size = SPK_BUFFER_SIZE,
.r_addr = NULL,
.r_size = 0,
.transfer_size = PDCA_TRANSFER_SIZE_WORD
}

volatile avr32_ssc_t* ssc = &AVR32_SSC

const gpio_map_t SSC_GPIO_MAP
| static

Initial value:
= {
{SSC_RX_CLOCK, SSC_RX_CLOCK_FUNCTION},
{SSC_RX_DATA, SSC_RX_DATA_FUNCTION},
{SSC_RX_FRAME_SYNC, SSC_RX_FRAME_SYNC_FUNCTION},
{SSC_TX_CLOCK, SSC_TX_CLOCK_FUNCTION},
{SSC_TX_DATA, SSC_TX_DATA_FUNCTION},
{SSC_TX_FRAME_SYNC, SSC_TX_FRAME_SYNC_FUNCTION}
}