2000-02-05 22:37:44 +00:00
//=========================================================================//
// //
// PonyProg - Serial Device Programmer //
// //
2019-02-08 00:29:55 +01:00
// Copyright (C) 1997-2019 Claudio Lanconelli //
2000-02-05 22:37:44 +00:00
// //
2007-04-20 10:58:20 +00:00
// http://ponyprog.sourceforge.net //
2000-02-05 22:37:44 +00:00
// //
//-------------------------------------------------------------------------//
// //
// This program is free software; you can redistribute it and/or //
// modify it under the terms of the GNU General Public License //
// as published by the Free Software Foundation; either version2 of //
// the License, or (at your option) any later version. //
// //
// This program is distributed in the hope that it will be useful, //
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU //
// General Public License for more details. //
// //
// You should have received a copy of the GNU General Public License //
2017-10-08 22:28:35 +02:00
// along with this program (see LICENSE); if not, write to the //
2000-02-05 22:37:44 +00:00
// Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //
// //
//=========================================================================//
2017-04-18 01:25:22 +02:00
# ifndef _EASYI2CINTERFACE_H
# define _EASYI2CINTERFACE_H
2000-02-05 22:37:44 +00:00
2004-11-30 17:46:48 +00:00
# include "lpt_ext_interf.h"
2000-02-05 22:37:44 +00:00
2004-11-30 17:46:48 +00:00
class EasyI2CInterface : public LptExtInterface
2000-02-05 22:37:44 +00:00
{
2018-10-16 18:42:23 +02:00
public :
2004-11-30 17:46:48 +00:00
EasyI2CInterface ( bool use_io = false ) ;
2000-02-05 22:37:44 +00:00
virtual int Open ( int com_no ) ;
virtual void Close ( ) ;
virtual void SetDataOut ( int sda = 1 ) ;
virtual void SetClock ( int scl = 1 ) ;
virtual int GetDataIn ( ) ;
virtual int GetClock ( ) ;
virtual void SetClockData ( ) ;
virtual int IsClockDataUP ( ) ;
virtual int IsClockDataDOWN ( ) ;
virtual int TestPort ( int port ) ;
2018-10-16 18:42:23 +02:00
protected :
2000-02-05 22:37:44 +00:00
2018-10-16 18:42:23 +02:00
private :
2000-02-05 22:37:44 +00:00
} ;
# endif