109
|
1 #ifndef INCLUDED_LIST_DATA
|
|
2 #define INCLUDED_LIST_DATA
|
|
3
|
|
4 #ifndef INCLUDED_BASE_H_
|
|
5 # include "base.h"
|
|
6 #endif
|
|
7
|
|
8 #define MAX_LIST_DMA_SIZE 8
|
|
9
|
|
10 class ListElement {
|
|
11 public:
|
|
12 BASE_NEW_DELETE(ListElement);
|
|
13
|
|
14 int size;
|
|
15 unsigned int addr;
|
|
16 };
|
|
17
|
|
18 typedef ListElement* ListElementPtr;
|
|
19
|
|
20 class ListData {
|
|
21 public:
|
|
22 BASE_NEW_DELETE(ListData);
|
|
23
|
|
24 int length; // The number of data (4)
|
|
25 int size; // Total size of data (4)
|
|
26 int a[2]; // for alignment
|
|
27 int bound[MAX_LIST_DMA_SIZE]; // (4 * MAX_LIST_DMA_SIZE)
|
|
28 ListElement element[MAX_LIST_DMA_SIZE]; // (8 * MAX_LIST_DMA_SIZE)
|
|
29
|
|
30 void clear(void) {
|
|
31 length = 0;
|
|
32 size = 0;
|
|
33 }
|
|
34 };
|
|
35
|
|
36 typedef ListData* ListDataPtr;
|
|
37
|
|
38 #endif
|