Mercurial > hg > Members > kono > Cerium
comparison include/TaskManager/DmaManager.h @ 109:5c194c71eca8
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | 504899860e66 |
children | 5cde66c926b4 |
comparison
equal
deleted
inserted
replaced
108:6f3b3dd3c095 | 109:5c194c71eca8 |
---|---|
1 #ifndef INCLUDED_DMA_MANAGER | 1 #ifndef INCLUDED_DMA_MANAGER |
2 #define INCLUDED_DMA_MANAGER | 2 #define INCLUDED_DMA_MANAGER |
3 | 3 |
4 #ifndef INCLUDED_BASE_H_ | |
5 # include "base.h" | |
6 #endif | |
7 | |
8 | |
4 enum dma_tag { | 9 enum dma_tag { |
5 DMA_READ, | 10 #if 0 |
6 DMA_WRITE | 11 DMA_READ = 27, |
12 DMA_WRITE = 28, | |
13 DMA_READ_TASKLIST = 29, | |
14 DMA_READ_IN_LIST = 30, | |
15 DMA_READ_OUT_LIST = 31, | |
16 #else | |
17 DMA_READ_TASKLIST = 27, | |
18 DMA_READ_IN_LIST = 28, | |
19 DMA_READ_OUT_LIST = 29, | |
20 DMA_READ = 30, | |
21 DMA_WRITE = 31, | |
22 #endif | |
7 }; | 23 }; |
24 | |
25 #ifndef INCLUDED_LIST_DATA | |
26 # include "ListData.h" | |
27 #endif | |
8 | 28 |
9 #ifndef INCLUDED_TYPES | 29 #ifndef INCLUDED_TYPES |
10 # include "types.h" | 30 # include "types.h" |
11 #endif | 31 #endif |
12 | 32 |
13 class DmaManager { | 33 class DmaManager { |
14 public: | 34 public: |
15 virtual ~DmaManager(void) {}; | 35 virtual ~DmaManager(void) {}; |
16 | 36 |
37 BASE_NEW_DELETE(DmaManager); | |
38 | |
17 // API for DMA transfer | 39 // API for DMA transfer |
18 virtual void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask)=0; | 40 virtual void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask) {} |
19 virtual void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask)=0; | 41 virtual void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask) {} |
20 virtual void dma_wait(uint32 mask) = 0; | 42 virtual void dma_wait(uint32 mask) {} |
21 | 43 |
22 // API for SPU inbound/outbound mailbox | 44 // API for SPU inbound/outbound mailbox |
23 virtual void mail_write(uint32 data) = 0; | 45 virtual void mail_write(uint32 data) {} |
24 virtual uint32 mail_read(void) = 0; | 46 virtual uint32 mail_read(void) {return 0;} |
25 | 47 |
26 // API for MFC list DMA transfer | 48 // API for MFC list DMA transfer |
27 virtual void dmaList_set(uint32 address, uint32 size) {} | 49 virtual void dma_loadList(ListDataPtr list, void *,uint32 mask) {} |
28 virtual void** dmaList_load(uint32 mask) { return (void**)0; } | 50 virtual void dma_storeList(ListDataPtr, void *buff, uint32 mask) {} |
29 }; | 51 }; |
30 | 52 |
31 #endif | 53 #endif |