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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librw11/] [Rw11UnitTerm.hpp] - Blame information for rev 19

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 wfjm
// $Id: Rw11UnitTerm.hpp 504 2013-04-13 15:37:24Z mueller $
2
//
3
// Copyright 2013- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
// 
14
// Revision History: 
15
// Date         Rev Version  Comment
16
// 2013-04-13   504   1.0    Initial version
17
// 2013-02-19   490   0.1    First draft
18
// ---------------------------------------------------------------------------
19
 
20
 
21
/*!
22
  \file
23
  \version $Id: Rw11UnitTerm.hpp 504 2013-04-13 15:37:24Z mueller $
24
  \brief   Declaration of class Rw11UnitTerm.
25
*/
26
 
27
#ifndef included_Retro_Rw11UnitTerm
28
#define included_Retro_Rw11UnitTerm 1
29
 
30
#include <deque>
31
 
32
#include "Rw11VirtTerm.hpp"
33
 
34
#include "Rw11UnitVirt.hpp"
35
 
36
namespace Retro {
37
 
38
  class Rw11UnitTerm : public Rw11UnitVirt<Rw11VirtTerm> {
39
    public:
40
                    Rw11UnitTerm(Rw11Cntl* pcntl, size_t index);
41
                   ~Rw11UnitTerm();
42
 
43
      const std::string& ChannelId() const;
44
 
45
      void          SetRcv7bit(bool rcv7bit);
46
      bool          Rcv7bit() const;
47
 
48
      virtual bool  RcvQueueEmpty();
49
      virtual size_t RcvQueueSize();
50
      virtual uint8_t RcvNext();
51
      virtual size_t Rcv(uint8_t* buf, size_t count);
52
 
53
      virtual bool  Snd(const uint8_t* buf, size_t count);
54
 
55
      virtual bool  RcvCallback(const uint8_t* buf, size_t count);
56
      virtual void  WakeupCntl();
57
 
58
      virtual void  Dump(std::ostream& os, int ind=0, const char* text=0) const;
59
 
60
    protected:
61
      virtual void  AttachSetup();
62
 
63
    protected:
64
      bool          fRcv7bit;               //<! discard parity bit on input
65
      std::deque<uint8_t>  fRcvQueue;       //<! input queue
66
  };
67
 
68
} // end namespace Retro
69
 
70
#include "Rw11UnitTerm.ipp"
71
 
72
#endif

powered by: WebSVN 2.1.0

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