OpenCores
URL https://opencores.org/ocsvn/thor/thor/trunk

Subversion Repositories thor

[/] [thor/] [trunk/] [software/] [emuThor/] [source/] [clsDevice.h] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 robfinch
#pragma once
2
 
3
// Generic system device
4 35 robfinch
//
5
// Base class for devices in the system. This is a more or less 
6
// abstract class with suggested methods to be provided in 
7
// derivatives. Default methods are provided in case the derived
8
// device class is read-only or write-only.
9 30 robfinch
 
10
class clsDevice
11
{
12
public:
13
        clsDevice(void) {};
14
        void Reset() {};
15
        bool IsSelected(unsigned int ad) { return false; };
16
        unsigned int Read(unsigned int ad) { return 0xDEADDEAD; };
17
        int Write(unsigned int ad, unsigned int dat, unsigned int mask) {};
18
        // Read the device and optionally set an address reservation.
19
        unsigned int Read(unsigned int ad, int sr) { return 0xDEADDEAD; };
20
        // Write the device and optionally clear an address reservation.
21
        int Write(unsigned int ad, unsigned int dat, unsigned int mask, int cr) {};
22
        void Step(void) {};
23
};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.