Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

DMA_buffer Class Reference

DMA_buffer is currently just a single page of physical memory allocated under the one megabyte mark that can be transfered via DMA. More...

#include <dma.h>

List of all members.

Public Member Functions

void alloc ()
void transfer (unsigned char channel, unsigned short int size, bool from_mem)
void free ()
void print ()

Public Attributes

void * data


Detailed Description

DMA_buffer is currently just a single page of physical memory allocated under the one megabyte mark that can be transfered via DMA.

Eventually this class should be expanded to allow multi-page transfers.


Member Function Documentation

void DMA_buffer::alloc  ) 
 

Allocate this DMA buffer.

void DMA_buffer::free  ) 
 

Free the memory used by this DMA buffer.

void DMA_buffer::print  ) 
 

Print basic information about this DMA buffer.

void DMA_buffer::transfer unsigned char  channel,
unsigned short int  size,
bool  from_mem
 

Perform a DMA transfer on the given channel of the given size in bytes.

Transfer from memory to device if from_mem is true. Otherwise, transfer from device to memory.


Member Data Documentation

void* DMA_buffer::data
 

DMA buffer: one physical page.


The documentation for this class was generated from the following files:

Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman