Main Page | Class Hierarchy | Class List | File List | Class 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 
00012 
00013 class DMA_buffer {
00014 public:
00015   void* data;       
00016 
00018   void
00019   alloc();
00020 
00024   void
00025   transfer(unsigned char channel, unsigned short int size, bool from_mem);
00026 
00028   void
00029   free();
00030 
00032   void
00033   print();
00034 };
00035 
00036 const unsigned
00037        mask_regs[] = {0x0a, 0x0a, 0x0a, 0x0a, 0xd4, 0xd4, 0xd4, 0xd4};
00038 const unsigned
00039        mode_regs[] = {0x0b, 0x0b, 0x0b, 0x0b, 0xd6, 0xd6, 0xd6, 0xd6};
00040 const unsigned
00041        clear_regs[] = {0x0c, 0x0c, 0x0c, 0x0c, 0xd8, 0xd8, 0xd8, 0xd8};
00042 const unsigned
00043        page_ports[] = {0x87, 0x83, 0x81, 0x82, 0x8f, 0x8b, 0x89, 0x8a};
00044 const unsigned
00045        offset_ports[] = {0x00, 0x02, 0x04, 0x06, 0xc0, 0xc4, 0xc8, 0xcc};
00046 const unsigned
00047        size_ports[] = {0x01, 0x03, 0x05, 0x07, 0xc2, 0xc6, 0xca, 0xce};
00048 const unsigned MODE_FROM_MEM = 0x48;
00049 const unsigned MODE_TO_MEM = 0x44;
00050 
00051 #endif
00052 
00053 /* Torsion Operating System, Copyright (C) 2000-2004 Dan Helfman
00054  *
00055  * This program is free software; you can redistribute it and/or modify it
00056  * under the terms of the GNU General Public License as published by the
00057  * Free Software Foundation; either version 2 of the License, or (at your
00058  * option) any later version.
00059  * 
00060  * This program is distributed in the hope that it will be useful, but
00061  * WITHOUT ANY WARRANTY; without even the implied warranty of
00062  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00063  * General Public License for more details (in the COPYING file).
00064  * 
00065  * You should have received a copy of the GNU General Public License along
00066  * with this program; if not, write to the Free Software Foundation, Inc.,
00067  * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00068  */

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