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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librlink/] [RlinkCommandExpect.ipp] - Diff between revs 28 and 30

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 28 Rev 30
Line 1... Line 1...
// $Id: RlinkCommandExpect.ipp 616 2014-12-21 10:09:25Z mueller $
// $Id: RlinkCommandExpect.ipp 661 2015-04-03 18:28:41Z mueller $
//
//
// Copyright 2011-2014 by Walter F.J. Mueller 
// Copyright 2011-2015 by Walter F.J. Mueller 
//
//
// This program is free software; you may redistribute and/or modify it under
// This program is free software; you may redistribute and/or modify it under
// the terms of the GNU General Public License as published by the Free
// the terms of the GNU General Public License as published by the Free
// Software Foundation, either version 2, or at your option any later version.
// Software Foundation, either version 2, or at your option any later version.
//
//
Line 11... Line 11...
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
// for complete details.
// for complete details.
//
//
// Revision History:
// Revision History:
// Date         Rev Version  Comment
// Date         Rev Version  Comment
 
// 2015-04-02   661   1.2    expect logic: remove stat from Expect, invert mask
// 2014-12-20   616   1.1    add Done count methods (for rblk/wblk)
// 2014-12-20   616   1.1    add Done count methods (for rblk/wblk)
// 2011-03-12   368   1.0    Initial version
// 2011-03-12   368   1.0    Initial version
// 2011-01-15   355   0.1    First draft
// 2011-01-15   355   0.1    First draft
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
 
 
/*!
/*!
  \file
  \file
  \version $Id: RlinkCommandExpect.ipp 616 2014-12-21 10:09:25Z mueller $
  \version $Id: RlinkCommandExpect.ipp 661 2015-04-03 18:28:41Z mueller $
  \brief   Implemenation (inline) of class RlinkCommandExpect.
  \brief   Implemenation (inline) of class RlinkCommandExpect.
*/
*/
 
 
// all method definitions in namespace Retro
// all method definitions in namespace Retro
namespace Retro {
namespace Retro {
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
 
 
inline void RlinkCommandExpect::SetStatus(uint8_t stat, uint8_t statmsk)
 
{
 
  fStatusVal = stat;
 
  fStatusMsk = statmsk;
 
  return;
 
}
 
 
 
//------------------------------------------+-----------------------------------
 
//! FIXME_docs
 
 
 
inline void RlinkCommandExpect::SetData(uint16_t data, uint16_t datamsk)
inline void RlinkCommandExpect::SetData(uint16_t data, uint16_t datamsk)
{
{
  fDataVal = data;
  fDataVal = data;
  fDataMsk = datamsk;
  fDataMsk = datamsk;
  return;
  return;
Line 51... Line 42...
//! FIXME_docs
//! FIXME_docs
 
 
inline void RlinkCommandExpect::SetDone(uint16_t done, bool check)
inline void RlinkCommandExpect::SetDone(uint16_t done, bool check)
{
{
  fDataVal = done;
  fDataVal = done;
  fDataMsk = check ? 0 : 0xffff;
  fDataMsk = check ? 0xffff : 0x0;
  return;
  return;
}
}
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
Line 79... Line 70...
}
}
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
 
 
inline uint8_t RlinkCommandExpect::StatusValue() const
 
{
 
  return fStatusVal;
 
}
 
 
 
//------------------------------------------+-----------------------------------
 
//! FIXME_docs
 
 
 
inline uint8_t RlinkCommandExpect::StatusMask() const
 
{
 
  return fStatusMsk;
 
}
 
 
 
//------------------------------------------+-----------------------------------
 
//! FIXME_docs
 
 
 
inline uint16_t RlinkCommandExpect::DataValue() const
inline uint16_t RlinkCommandExpect::DataValue() const
{
{
  return fDataVal;
  return fDataVal;
}
}
 
 
Line 135... Line 110...
}
}
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
 
 
inline bool RlinkCommandExpect::StatusCheck(uint8_t val) const
 
{
 
  return (val|fStatusMsk) == (fStatusVal|fStatusMsk);
 
}
 
 
 
//------------------------------------------+-----------------------------------
 
//! FIXME_docs
 
 
 
inline bool RlinkCommandExpect::DataCheck(uint16_t val) const
inline bool RlinkCommandExpect::DataCheck(uint16_t val) const
{
{
  return (val|fDataMsk) == (fDataVal|fDataMsk);
  return (val & fDataMsk) == fDataVal;
}
}
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
 
 
Line 159... Line 126...
}
}
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
 
 
inline bool RlinkCommandExpect::StatusIsChecked() const
 
{
 
  return fStatusMsk != 0xff;
 
}
 
 
 
//------------------------------------------+-----------------------------------
 
//! FIXME_docs
 
 
 
inline bool RlinkCommandExpect::DataIsChecked() const
inline bool RlinkCommandExpect::DataIsChecked() const
{
{
  return fDataMsk != 0xffff;
  return fDataMsk != 0x0;
}
}
 
 
//------------------------------------------+-----------------------------------
//------------------------------------------+-----------------------------------
//! FIXME_docs
//! FIXME_docs
 
 
inline bool RlinkCommandExpect::DoneIsChecked() const
inline bool RlinkCommandExpect::DoneIsChecked() const
{
{
  return fDataMsk == 0;
  return fDataMsk != 0x0;
}
}
 
 
} // end namespace Retro
} // end namespace Retro

powered by: WebSVN 2.1.0

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