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
taskAK5394A.h
Go to the documentation of this file.
1 /* -*- mode: c++; tab-width: 4; c-basic-offset: 4 -*- */
2 /*
3 * taskAK5394A.h
4 *
5 * Created on: Feb 16, 2010
6 * Refactored on: Feb 26, 2011
7 * Author: Alex
8 *
9 * Copyright (C) Alex Lee
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 */
25
26 #ifndef TASKAK5394A_H_
27 #define TASKAK5394A_H_
28
29
30 #define PDCA_CHANNEL_SSC_RX 0 // highest priority of 8 channels
31 #define PDCA_CHANNEL_SSC_TX 1
32 #define AUDIO_BUFFER_SIZE (48*2*8) // 48 khz, stereo, 8 ms worth
33 #define SPK_BUFFER_SIZE (48*2*16)
34
35
36 //extern const gpio_map_t SSC_GPIO_MAP;
37 //extern const pdca_channel_options_t PDCA_OPTIONS;
38 //extern const pdca_channel_options_t SPK_PDCA_OPTIONS;
39
40 extern volatile U32 audio_buffer_0[AUDIO_BUFFER_SIZE];
41 extern volatile U32 audio_buffer_1[AUDIO_BUFFER_SIZE];
42 extern volatile U32 spk_buffer_0[SPK_BUFFER_SIZE];
43 extern volatile U32 spk_buffer_1[SPK_BUFFER_SIZE];
44 extern volatile avr32_ssc_t *ssc;
45 extern volatile int audio_buffer_in;
46 extern volatile int spk_buffer_out;
47
48 void AK5394A_pdca_disable(void);
49 void AK5394A_pdca_enable(void);
50 void AK5394A_task_init(Bool uac2);
51
52 #endif /* TASKAK5394A_H_ */