source: rtems/bsps/m68k/include/mcf548x/mcdma_glue.h @ e560ee85

Last change on this file since e560ee85 was 4d22b554, checked in by Sebastian Huber <sebastian.huber@…>, on 03/26/18 at 11:11:51

bsps/m68k: Fix warning

  • Property mode set to 100644
File size: 6.2 KB
Line 
1/*===============================================================*\
2| Project: RTEMS generic MFC548x BSP                              |
3+-----------------------------------------------------------------+
4|                    Copyright (c) 2004-2009                      |
5|                    Embedded Brains GmbH                         |
6|                    Obere Lagerstr. 30                           |
7|                    D-82178 Puchheim                             |
8|                    Germany                                      |
9|                    rtems@embedded-brains.de                     |
10+-----------------------------------------------------------------+
11| The license and distribution terms for this file may be         |
12| found in the file LICENSE in this distribution or at            |
13|                                                                 |
14| http://www.rtems.org/license/LICENSE.                           |
15|                                                                 |
16+-----------------------------------------------------------------+
17| this file declares glue functions to the Freescale Mcdma API |
18\*===============================================================*/
19#ifndef _MCDMA_GLUE_H
20#define _MCDMA_GLUE_H
21
22#include <rtems.h>
23#include <rtems/irq.h>
24#include <mcf548x/mcf548x.h>
25
26#define MCDMA_CLR_PENDING(chan) (MCF548X_DMA_DIPR = (1 << (chan)))
27#define MCDMA_GET_PENDING(chan) (MCF548X_DMA_DIPR & (1 << (chan)))
28
29/*=========================================================================*\
30| Function:                                                                 |
31\*-------------------------------------------------------------------------*/
32void mcdma_glue_irq_enable
33(
34/*-------------------------------------------------------------------------*\
35| Purpose:                                                                  |
36|   enable interrupt for given task number                                  |
37+---------------------------------------------------------------------------+
38| Input Parameters:                                                         |
39\*-------------------------------------------------------------------------*/
40 int mcdma_taskno                           /* task number to enable    */
41 );
42/*-------------------------------------------------------------------------*\
43| Return Value:                                                             |
44|    none                                                                   |
45\*=========================================================================*/
46
47/*=========================================================================*\
48| Function:                                                                 |
49\*-------------------------------------------------------------------------*/
50void mcdma_glue_irq_disable
51(
52/*-------------------------------------------------------------------------*\
53| Purpose:                                                                  |
54|   disable interrupt for given task number                                 |
55+---------------------------------------------------------------------------+
56| Input Parameters:                                                         |
57\*-------------------------------------------------------------------------*/
58 int mcdma_taskno                           /* task number to disable   */
59 );
60/*-------------------------------------------------------------------------*\
61| Return Value:                                                             |
62|    none                                                                   |
63\*=========================================================================*/
64
65/*=========================================================================*\
66| Function:                                                                 |
67\*-------------------------------------------------------------------------*/
68void mcdma_glue_irq_install
69(
70/*-------------------------------------------------------------------------*\
71| Purpose:                                                                  |
72|   install given function as mcdma interrupt handler                    |
73+---------------------------------------------------------------------------+
74| Input Parameters:                                                         |
75\*-------------------------------------------------------------------------*/
76 int mcdma_taskno,                          /* task number for handler  */
77 void (*the_handler)(rtems_irq_hdl_param),     /* function to call         */
78 void *the_param
79 );
80/*-------------------------------------------------------------------------*\
81| Return Value:                                                             |
82|    none                                                                   |
83\*=========================================================================*/
84
85/*=========================================================================*\
86| Function:                                                                 |
87\*-------------------------------------------------------------------------*/
88void mcdma_glue_init
89(
90/*-------------------------------------------------------------------------*\
91| Purpose:                                                                  |
92|   initialize the mcdma module (if not yet done):                          |
93|   - load code                                                             |
94|   - initialize registers                                                  |
95|   - initialize bus arbiter                                                |
96|   - initialize interrupt control                                          |
97+---------------------------------------------------------------------------+
98| Input Parameters:                                                         |
99\*-------------------------------------------------------------------------*/
100 void *sram_base         /* base address for SRAM, to be used for DMA task */
101 );
102/*-------------------------------------------------------------------------*\
103| Return Value:                                                             |
104|    none                                                                   |
105\*=========================================================================*/
106
107#endif /* _MCDMA_GLUE_H */
Note: See TracBrowser for help on using the repository browser.