Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

dma.h

Go to the documentation of this file.
00001 // See the end of this file for license information.
00002 
00003 #ifndef TORSION_DMA_H
00004 #define TORSION_DMA_H
00005 
00006 #include "asm.h"
00007 
00010 
00016 class DMA_buffer {
00017 public:
00018   void* data;                           
00019 
00021   void
00022   alloc();
00023 
00027   void
00028   transfer(unsigned char channel, unsigned short int size, bool from_mem);
00029 
00031   void
00032   free();
00033 };
00034 
00035 const unsigned int
00036        mask_regs[] = {0x0a, 0x0a, 0x0a, 0x0a, 0xd4, 0xd4, 0xd4, 0xd4};
00037 const unsigned int
00038        mode_regs[] = {0x0b, 0x0b, 0x0b, 0x0b, 0xd6, 0xd6, 0xd6, 0xd6};
00039 const unsigned int
00040        clear_regs[] = {0x0c, 0x0c, 0x0c, 0x0c, 0xd8, 0xd8, 0xd8, 0xd8};
00041 const unsigned int
00042        page_ports[] = {0x87, 0x83, 0x81, 0x82, 0x8f, 0x8b, 0x89, 0x8a};
00043 const unsigned int
00044        offset_ports[] = {0x00, 0x02, 0x04, 0x06, 0xc0, 0xc4, 0xc8, 0xcc};
00045 const unsigned int
00046        size_ports[] = {0x01, 0x03, 0x05, 0x07, 0xc2, 0xc6, 0xca, 0xce};
00047 const unsigned int MODE_FROM_MEM = 0x48;
00048 const unsigned int MODE_TO_MEM = 0x44;
00049 
00050 #endif
00051 
00052 /* Torsion Operating System, Copyright (C) 2000-2002 Dan Helfman
00053  *
00054  * This program is free software; you can redistribute it and/or modify it
00055  * under the terms of the GNU General Public License as published by the
00056  * Free Software Foundation; either version 2 of the License, or (at your
00057  * option) any later version.
00058  * 
00059  * This program is distributed in the hope that it will be useful, but
00060  * WITHOUT ANY WARRANTY; without even the implied warranty of
00061  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00062  * General Public License for more details (in the COPYING file).
00063  * 
00064  * You should have received a copy of the GNU General Public License along
00065  * with this program; if not, write to the Free Software Foundation, Inc.,
00066  * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00067  */

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