M:Robe 500: Commit some minor changes and some keymap changes (short press power...
[kugel-rb.git] / firmware / target / arm / as3525 / dma-target.h
blob812139710acad2dac76d00978f5352a84ea94486
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright © 2008 Rafaël Carré
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #include <stdbool.h>
23 #include <stdlib.h>
25 /* DMA request lines (16 max): not specified in AS3525 datasheet, but common to
26 * all AS3525 based models (made by SanDisk) supported by rockbox. */
28 #define DMA_PERI_SD_SLOT 2
29 #define DMA_PERI_I2SOUT 3
30 #define DMA_PERI_I2SIN 4
31 #define DMA_PERI_SD 5 /* embedded storage */
32 #define DMA_PERI_DBOP 8
34 void dma_init(void);
35 void dma_enable_channel(int channel, void *src, void *dst, int peri,
36 int flow_controller, bool src_inc, bool dst_inc,
37 size_t size, int nwords, void (*callback)(void));
38 inline void dma_disable_channel(int channel);
40 void dma_retain(void);
41 void dma_release(void);