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

Subversion Repositories aemb

[/] [aemb/] [trunk/] [sw/] [vpio/] [vpioGpio.hh] - Diff between revs 196 and 197

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

Rev 196 Rev 197
Line 35... Line 35...
#include "vpioGpio.h"
#include "vpioGpio.h"
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
 
 
 
namespace vpio {
 
 
/*!
/*!
   General-Purpose I/O Class.
   General-Purpose I/O Class.
 
 
   This is a C++ wrapper class around the low-level C code.
   This is a C++ wrapper class around the low-level C code.
*/
*/
 
 
class vpioGpioClass : public vpioGpioRegs
class gpioClass : public gpioRegs
{
{
 
 
private:
private:
 
 
  //vpioGpioClass(const vpioGpioClass&);
  //gpioClass(const gpioClass&);
  //vpioGpioClass();
  //gpioClass();
  vpioGpioClass& operator=(const vpioGpioClass&);
  gpioClass& operator=(const gpioClass&);
 
 
public:
public:
 
 
  //void IniPort(int base_addr) { this = (vpioGpioRegs*)base_addr; }
  //void IniPort(int base_addr) { this = (gpioRegs*)base_addr; }
 
 
  void SetBit(int bit) { vpioGpioSetBit( (vpioGpioRegs*)this, bit); } ///< @see vpioGpioSetBit
  void SetBit(gpioData bit) { gpioSetBit( (gpioRegs*)this, bit); } ///< @see gpioSetBit
  void ClrBit(int bit) { vpioGpioClrBit( (vpioGpioRegs*)this, bit); } ///< @see vpioGpioClrBit
  void ClrBit(gpioData bit) { gpioClrBit( (gpioRegs*)this, bit); } ///< @see gpioClrBit
  void TogBit(int bit) { vpioGpioTogBit( (vpioGpioRegs*)this, bit); } ///< @see vpioGpioTogBit
  void TogBit(gpioData bit) { gpioTogBit( (gpioRegs*)this, bit); } ///< @see gpioTogBit
  int  GetBit(int bit) { return vpioGpioGetBit( (vpioGpioRegs*)this, bit); } ///< @see vpioGpioGetBit
  gpioData  GetBit(gpioData bit) { return gpioGetBit( (gpioRegs*)this, bit); } ///< @see gpioGetBit
 
 
  // Port Manipulation
  // Port Manipulation
  void CfgPort(int mask) { vpioGpioCfgPort( (vpioGpioRegs*)this, mask); } ///< @see vpioGpioCfgPort
  //void PutTris(gpioData mask) { gpioPutTris( (gpioRegs*)this, mask); } ///< @see gpioPutTris
  void PutPort(int data) { vpioGpioPutPort( (vpioGpioRegs*)this, data); } ///< @see vpioGpioPutPort
  void SetTris(gpioData mask) { gpioSetTris( (gpioRegs*)this, mask); } ///< @see gpioSetTris
  void ClrPort() { vpioGpioClrPort( (vpioGpioRegs*)this ); } ///< @see vpioGpioClrPort
  void PutData(gpioData data) { gpioPutData( (gpioRegs*)this, data); } ///< @see gpioPutData
  int  GetPort() { return vpioGpioGetPort( (vpioGpioRegs*)this ); } ///< @see vpioGpioGetPort
  //void ClrPort() { gpioClrPort( (gpioRegs*)this ); } ///< @see gpioClrPort
 
  //gpioData GetTris() { return gpioGetTris( (gpioRegs*)this ); } ///< @see gpioGetTris
 
  gpioData GetData() { return gpioGetData( (gpioRegs*)this ); } ///< @see gpioGetData
 
 
 
  void Init() { gpioInit( (gpioRegs*)this ); } ///< @see gpioInit
};
};
 
 
 
}
 
 
#endif
#endif

powered by: WebSVN 2.1.0

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