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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [tools/] [src/] [librlink/] [RlinkCrc8.ipp] - 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: RlinkCrc8.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-02-27   365   1.0    Initial version
17
// 2011-01-15   355   0.1    First draft
18
// ---------------------------------------------------------------------------
19
 
20
/*!
21
  \file
22 19 wfjm
  \version $Id: RlinkCrc8.ipp 488 2013-02-16 18:49:47Z mueller $
23 10 wfjm
  \brief   Implemenation (inline) of class RlinkCrc8.
24
*/
25
 
26 19 wfjm
// all method definitions in namespace Retro
27 10 wfjm
namespace Retro {
28
 
29
//------------------------------------------+-----------------------------------
30
//! Default constructor
31
 
32
inline RlinkCrc8::RlinkCrc8()
33
  : fCrc(0)
34
{}
35
 
36
//------------------------------------------+-----------------------------------
37
//! Destructor
38
 
39
inline RlinkCrc8::~RlinkCrc8()
40
{}
41
 
42
//------------------------------------------+-----------------------------------
43
//! FIXME_docs
44
 
45
inline void RlinkCrc8::Clear()
46
{
47
  fCrc = 0;
48
  return;
49
}
50
 
51
//------------------------------------------+-----------------------------------
52
//! FIXME_docs
53
 
54
inline void RlinkCrc8::AddData(uint8_t data)
55
{
56
  fCrc = fCrc8Table[fCrc ^ data];
57
  return;
58
}
59
 
60
//------------------------------------------+-----------------------------------
61
//! FIXME_docs
62
 
63
inline uint8_t RlinkCrc8::Crc() const
64
{
65
  return fCrc;
66
}
67
 
68
} // end namespace Retro

powered by: WebSVN 2.1.0

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