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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [tools/] [src/] [librlink/] [RlinkContext.ipp] - Blame information for rev 38

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 wfjm
// $Id: RlinkContext.ipp 660 2015-03-29 22:10:16Z mueller $
2 19 wfjm
//
3 30 wfjm
// Copyright 2013-2015 by Walter F.J. Mueller 
4 19 wfjm
//
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 30 wfjm
// 2015-03-28   660   1.1    add SetStatus(Value|Mask)()
17 19 wfjm
// 2013-02-23   492   1.0    Initial version
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22 30 wfjm
  \version $Id: RlinkContext.ipp 660 2015-03-29 22:10:16Z mueller $
23 19 wfjm
  \brief   Implemenation (inline) of class RlinkContext.
24
*/
25
 
26
// all method definitions in namespace Retro
27
namespace Retro {
28
 
29
//------------------------------------------+-----------------------------------
30
//! FIXME_docs
31
 
32
inline void RlinkContext::SetStatus(uint8_t stat, uint8_t statmsk)
33
{
34
  fStatusVal = stat;
35
  fStatusMsk = statmsk;
36
  return;
37
}
38
 
39
//------------------------------------------+-----------------------------------
40
//! FIXME_docs
41
 
42 30 wfjm
inline void RlinkContext::SetStatusValue(uint8_t stat)
43
{
44
  fStatusVal = stat;
45
  return;
46
}
47
 
48
//------------------------------------------+-----------------------------------
49
//! FIXME_docs
50
 
51
inline void RlinkContext::SetStatusMask(uint8_t statmsk)
52
{
53
  fStatusMsk = statmsk;
54
  return;
55
}
56
 
57
//------------------------------------------+-----------------------------------
58
//! FIXME_docs
59
 
60 19 wfjm
inline uint8_t RlinkContext::StatusValue() const
61
{
62
  return fStatusVal;
63
}
64
 
65
//------------------------------------------+-----------------------------------
66
//! FIXME_docs
67
 
68
inline uint8_t RlinkContext::StatusMask() const
69
{
70
  return fStatusMsk;
71
}
72
 
73
//------------------------------------------+-----------------------------------
74
//! FIXME_docs
75
 
76
inline bool RlinkContext::StatusIsChecked() const
77
{
78
  return fStatusMsk != 0xff;
79
}
80
 
81
//------------------------------------------+-----------------------------------
82
//! FIXME_docs
83
 
84
inline bool RlinkContext::StatusCheck(uint8_t val) const
85
{
86
  return (val|fStatusMsk) == (fStatusVal|fStatusMsk);
87
}
88
 
89
//------------------------------------------+-----------------------------------
90
//! FIXME_docs
91
 
92
inline void RlinkContext::IncErrorCount(size_t inc)
93
{
94
  fErrCnt += inc;
95
  return;
96
}
97
 
98
//------------------------------------------+-----------------------------------
99
//! FIXME_docs
100
 
101
inline void RlinkContext::ClearErrorCount()
102
{
103
  fErrCnt = 0;
104
  return;
105
}
106
 
107
//------------------------------------------+-----------------------------------
108
//! FIXME_docs
109
 
110
inline size_t RlinkContext::ErrorCount() const
111
{
112
  return fErrCnt;
113
}
114
 
115
} // end namespace Retro

powered by: WebSVN 2.1.0

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