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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librlink/] [RlinkCommandExpect.ipp] - Blame information for rev 40

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

Line No. Rev Author Line
1 19 wfjm
// $Id: RlinkCommandExpect.ipp 488 2013-02-16 18:49:47Z mueller $
2 10 wfjm
//
3
// Copyright 2011- by Walter F.J. Mueller 
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
// 2011-03-12   368   1.0    Initial version
17
// 2011-01-15   355   0.1    First draft
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22 19 wfjm
  \version $Id: RlinkCommandExpect.ipp 488 2013-02-16 18:49:47Z mueller $
23 10 wfjm
  \brief   Implemenation (inline) of class RlinkCommandExpect.
24
*/
25
 
26 19 wfjm
// all method definitions in namespace Retro
27 10 wfjm
namespace Retro {
28
 
29
//------------------------------------------+-----------------------------------
30 19 wfjm
//! FIXME_docs
31 10 wfjm
 
32
inline void RlinkCommandExpect::SetStatus(uint8_t stat, uint8_t statmsk)
33
{
34
  fStatusVal = stat;
35
  fStatusMsk = statmsk;
36
  return;
37
}
38
 
39
//------------------------------------------+-----------------------------------
40 19 wfjm
//! FIXME_docs
41 10 wfjm
 
42
inline void RlinkCommandExpect::SetData(uint16_t data, uint16_t datamsk)
43
{
44
  fDataVal = data;
45
  fDataMsk = datamsk;
46
  return;
47
}
48
 
49
//------------------------------------------+-----------------------------------
50 19 wfjm
//! FIXME_docs
51 10 wfjm
 
52
inline void RlinkCommandExpect::SetBlock(const std::vector& block)
53
{
54
  fBlockVal = block;
55
  return;
56
}
57
 
58
//------------------------------------------+-----------------------------------
59 19 wfjm
//! FIXME_docs
60 10 wfjm
 
61
inline void RlinkCommandExpect::SetBlock(
62
                   const std::vector& block,
63
                   const std::vector& blockmsk)
64
{
65
  fBlockVal = block;
66
  fBlockMsk = blockmsk;
67
  return;
68
}
69
 
70
//------------------------------------------+-----------------------------------
71 19 wfjm
//! FIXME_docs
72 10 wfjm
 
73
inline uint8_t RlinkCommandExpect::StatusValue() const
74
{
75
  return fStatusVal;
76
}
77
 
78
//------------------------------------------+-----------------------------------
79 19 wfjm
//! FIXME_docs
80 10 wfjm
 
81
inline uint8_t RlinkCommandExpect::StatusMask() const
82
{
83
  return fStatusMsk;
84
}
85
 
86
//------------------------------------------+-----------------------------------
87 19 wfjm
//! FIXME_docs
88 10 wfjm
 
89
inline uint16_t RlinkCommandExpect::DataValue() const
90
{
91
  return fDataVal;
92
}
93
 
94
//------------------------------------------+-----------------------------------
95 19 wfjm
//! FIXME_docs
96 10 wfjm
 
97
inline uint16_t RlinkCommandExpect::DataMask() const
98
{
99
  return fDataMsk;
100
}
101
 
102
//------------------------------------------+-----------------------------------
103 19 wfjm
//! FIXME_docs
104 10 wfjm
 
105
inline const std::vector& RlinkCommandExpect::BlockValue() const
106
{
107
  return fBlockVal;
108
}
109
 
110
//------------------------------------------+-----------------------------------
111 19 wfjm
//! FIXME_docs
112 10 wfjm
 
113
inline const std::vector& RlinkCommandExpect::BlockMask() const
114
{
115
  return fBlockMsk;
116
}
117
 
118
//------------------------------------------+-----------------------------------
119 19 wfjm
//! FIXME_docs
120 10 wfjm
 
121
inline bool RlinkCommandExpect::StatusCheck(uint8_t val) const
122
{
123
  return (val|fStatusMsk) == (fStatusVal|fStatusMsk);
124
}
125
 
126
//------------------------------------------+-----------------------------------
127 19 wfjm
//! FIXME_docs
128 10 wfjm
 
129
inline bool RlinkCommandExpect::DataCheck(uint16_t val) const
130
{
131
  return (val|fDataMsk) == (fDataVal|fDataMsk);
132
}
133
 
134
//------------------------------------------+-----------------------------------
135 19 wfjm
//! FIXME_docs
136 10 wfjm
 
137
inline bool RlinkCommandExpect::StatusIsChecked() const
138
{
139
  return fStatusMsk != 0xff;
140
}
141
 
142
//------------------------------------------+-----------------------------------
143 19 wfjm
//! FIXME_docs
144 10 wfjm
 
145
inline bool RlinkCommandExpect::DataIsChecked() const
146
{
147
  return fDataMsk != 0xffff;
148
}
149
 
150
} // end namespace Retro

powered by: WebSVN 2.1.0

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