RTEMS  5.1
bspVmeDmaListP.h
Go to the documentation of this file.
1 
9 #ifndef BSP_VME_DMA_LIST_P_H
10 #define BSP_VME_DMA_LIST_P_H
11 
12 #include <bsp/bspVmeDmaList.h>
13 
14 /*
15  * This is used by chip drivers to implement the
16  * 'class' members so that 'bspVmeDmaList' can access
17  * the device in an abstract manner.
18  */
19 
20 /*
21  * Authorship
22  * ----------
23  * This software was created by
24  * Till Straumann <strauman@slac.stanford.edu>, 2006, 2007
25  * Stanford Linear Accelerator Center, Stanford University.
26  *
27  * Acknowledgement of sponsorship
28  * ------------------------------
29  * This software was produced by
30  * the Stanford Linear Accelerator Center, Stanford University,
31  * under Contract DE-AC03-76SFO0515 with the Department of Energy.
32  *
33  * Government disclaimer of liability
34  * ----------------------------------
35  * Neither the United States nor the United States Department of Energy,
36  * nor any of their employees, makes any warranty, express or implied, or
37  * assumes any legal liability or responsibility for the accuracy,
38  * completeness, or usefulness of any data, apparatus, product, or process
39  * disclosed, or represents that its use would not infringe privately owned
40  * rights.
41  *
42  * Stanford disclaimer of liability
43  * --------------------------------
44  * Stanford University makes no representations or warranties, express or
45  * implied, nor assumes any liability for the use of this software.
46  *
47  * Stanford disclaimer of copyright
48  * --------------------------------
49  * Stanford University, owner of the copyright, hereby disclaims its
50  * copyright and all other rights in this software. Hence, anyone may
51  * freely use it for any purpose without restriction.
52  *
53  * Maintenance of notices
54  * ----------------------
55  * In the interest of clarity regarding the origin and status of this
56  * SLAC software, this and all the preceding Stanford University notices
57  * are to remain affixed to any copy or derivative of this software made
58  * or distributed by the recipient and are to be affixed to any copy of
59  * software made or distributed by the recipient that contains a copy or
60  * derivative of this software.
61  *
62  * ------------------ SLAC Software Notices, Set 4 OTT.002a, 2004 FEB 03
63  */
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 typedef void *DmaDescriptor;
69 
78 typedef DmaDescriptor (*DmaDescriptorAlloc)(void);
79 typedef void (*DmaDescriptorFree) (DmaDescriptor d);
80 typedef void (*DmaDescriptorInit) (DmaDescriptor d);
81 /* Setup takes the parameters declared in VMEDMA.h */
82 typedef int (*DmaDescriptorSetup)(DmaDescriptor d, uint32_t, uint32_t, uint32_t, uint32_t, uint32_t);
83 typedef void (*DmaDescriptorSetNxt)(DmaDescriptor d, DmaDescriptor next);
84 typedef int (*DmaDescriptorStart)(volatile void *controller_addr, int channel, DmaDescriptor);
85 typedef int (*DmaDescriptorRefr) (DmaDescriptor);
86 typedef void (*DmaDescriptorDump) (DmaDescriptor);
87 
88 
89 typedef struct VMEDmaListClassRec_ {
90  int desc_size; /* size of a descritor */
91  int desc_align; /* alignment of a descriptor */
92  VMEDmaListNode freeList; /* list of free descriptors of this class, MUST be initialized to NULL */
93  DmaDescriptorAlloc desc_alloc; /* [optional, may be NULL] allocator for one descriptor */
94  DmaDescriptorFree desc_free; /* [optional, may be NULL] destructor for one descriptor */
95  DmaDescriptorInit desc_init; /* [optional, may be NULL] set stuff that don't change during lifetime */
96  DmaDescriptorSetNxt desc_setnxt;/* set 'NEXT' pointer in descriptor; mark as LAST if next == 0 */
97  DmaDescriptorSetup desc_setup; /* setup a descriptor */
98  DmaDescriptorStart desc_start; /* start list at a descriptor */
99  DmaDescriptorRefr desc_refr; /* refresh a descriptor */
100  DmaDescriptorDump desc_dump; /* dump a descriptor (for debugging) */
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif
Definition: bspVmeDmaListP.h:89
This header should only be used inside a BSP chosing to use bspVmeDmaList for implementing VMEDMA....
Definition: bspVmeDmaList.c:61