Mercurial > hg > Members > kono > Cerium
diff 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 |
line wrap: on
line diff
--- a/include/TaskManager/DmaManager.h Wed Nov 12 17:29:35 2008 +0900 +++ b/include/TaskManager/DmaManager.h Wed Nov 12 17:39:33 2008 +0900 @@ -1,11 +1,31 @@ #ifndef INCLUDED_DMA_MANAGER #define INCLUDED_DMA_MANAGER +#ifndef INCLUDED_BASE_H_ +# include "base.h" +#endif + + enum dma_tag { - DMA_READ, - DMA_WRITE +#if 0 + DMA_READ = 27, + DMA_WRITE = 28, + DMA_READ_TASKLIST = 29, + DMA_READ_IN_LIST = 30, + DMA_READ_OUT_LIST = 31, +#else + DMA_READ_TASKLIST = 27, + DMA_READ_IN_LIST = 28, + DMA_READ_OUT_LIST = 29, + DMA_READ = 30, + DMA_WRITE = 31, +#endif }; +#ifndef INCLUDED_LIST_DATA +# include "ListData.h" +#endif + #ifndef INCLUDED_TYPES # include "types.h" #endif @@ -14,18 +34,20 @@ public: virtual ~DmaManager(void) {}; + BASE_NEW_DELETE(DmaManager); + // API for DMA transfer - virtual void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask)=0; - virtual void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask)=0; - virtual void dma_wait(uint32 mask) = 0; + virtual void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask) {} + virtual void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask) {} + virtual void dma_wait(uint32 mask) {} // API for SPU inbound/outbound mailbox - virtual void mail_write(uint32 data) = 0; - virtual uint32 mail_read(void) = 0; - + virtual void mail_write(uint32 data) {} + virtual uint32 mail_read(void) {return 0;} + // API for MFC list DMA transfer - virtual void dmaList_set(uint32 address, uint32 size) {} - virtual void** dmaList_load(uint32 mask) { return (void**)0; } + virtual void dma_loadList(ListDataPtr list, void *,uint32 mask) {} + virtual void dma_storeList(ListDataPtr, void *buff, uint32 mask) {} }; #endif