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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sw/] [vpio/] [vpioLcd.hh] - Blame information for rev 197

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 197 sybreon
/* $Id: memtest.hh,v 1.8 2008-06-24 10:03:41 sybreon Exp $
2
**
3
** VIRTUAL PERIPHERAL I/O LIBRARY
4
** Copyright (C) 2009 Shawn Tan 
5
**
6
** This file is part of AEMB.
7
**
8
** AEMB is free software: you can redistribute it and/or modify it
9
** under the terms of the GNU General Public License as published by
10
** the Free Software Foundation, either version 3 of the License, or
11
** (at your option) any later version.
12
**
13
** AEMB is distributed in the hope that it will be useful, but WITHOUT
14
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15
** or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16
** License for more details.
17
**
18
** You should have received a copy of the GNU General Public License
19
** along with AEMB.  If not, see .
20
*/
21
 
22
/*!
23
  Character LCD C++ Interface.
24
  @file vpioLcd.hh
25
 
26
  This file provides a C++ wrapper class to the low-level C interface.
27
 */
28
 
29
#ifndef VPIO_LCD_HH
30
#define VPIO_LCD_HH
31
 
32
#ifdef __cplusplus
33
extern "C" {
34
#endif
35
#include "vpioLcd.h"
36
#ifdef __cplusplus
37
}
38
#endif
39
 
40
namespace vpio {
41
 
42
/*!
43
   General-Purpose I/O Class.
44
 
45
   This is a C++ wrapper class around the low-level C code.
46
*/
47
 
48
class lcdClass : public lcdRegs
49
{
50
 
51
private:
52
 
53
  lcdClass& operator=(const lcdClass&);
54
 
55
public:
56
 
57
  // Low-level I/O functions
58
  void Reset() { lcdReset((lcdRegs*)this); } ///< @see lcdReset
59
  void WaitBusy() { lcdWaitBusy((lcdRegs*)this); } ///< @see lcdWaitBusy
60
  void PutControl(char ctrl) { lcdPutControl((lcdRegs*)this, ctrl); } ///< @see lcdPutControl
61
  char GetControl() { return lcdGetControl((lcdRegs*)this); } ///< @see lcdGetControl
62
  void PutData(char data) { lcdPutData((lcdRegs*)this,data); } ///< @see lcdPutData
63
  char GetData() { return lcdGetData((lcdRegs*)this); } ///< @see lcdGetData
64
  void Delay(int ms) { lcdDelay(ms); } ///< @see lcdDelay
65
 
66
  // High-level application functions
67
  void Init() { lcdInit((lcdRegs*)this); } ///< @see lcdInit
68
  void Home() { lcdHome((lcdRegs*)this); } ///< @see lcdHome
69
  void Clear() { lcdClear((lcdRegs*)this); } ///< @see lcdClear
70
 
71
};
72
 
73
}
74
 
75
#endif

powered by: WebSVN 2.1.0

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