view include/TaskManager/DmaManager.h @ 230:56314060907f draft

fix Random
author gongo@localhost.localdomain
date Fri, 13 Feb 2009 10:53:58 +0900
parents e3b7776b1420
children a314d8cd2082
line wrap: on
line source

#ifndef INCLUDED_DMA_MANAGER
#define INCLUDED_DMA_MANAGER

#ifndef INCLUDED_BASE_H_
#  include "base.h"
#endif

#ifndef INCLUDED_LIST_DATA
#  include "ListData.h"
#endif

#ifndef INCLUDED_TYPES
#  include "types.h"
 #endif

enum dma_tag {
    DMA_READ_TASKLIST = 27,
    DMA_READ_IN_LIST  = 28,
    DMA_READ_OUT_LIST = 29,
    DMA_READ  = 30,
    DMA_WRITE = 31,
};

class DmaManager {
public:
    virtual ~DmaManager(void) {};

    BASE_NEW_DELETE(DmaManager);

    // API for DMA transfer
    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) {}
    virtual uint32 mail_read(void) {return 0;}
    
    // API for MFC list DMA transfer
    virtual void dma_loadList(ListDataPtr list, void *,uint32 mask) {}
    virtual void dma_storeList(ListDataPtr, void *buff, uint32 mask) {}
};

#endif