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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [tools/] [src/] [tools/] [ecostest/] [common/] [X10.h] - Blame information for rev 174

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 unneback
//####COPYRIGHTBEGIN####
2
//                                                                          
3
// ----------------------------------------------------------------------------
4
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5
//
6
// This program is part of the eCos host tools.
7
//
8
// This program is free software; you can redistribute it and/or modify it 
9
// under the terms of the GNU General Public License as published by the Free 
10
// Software Foundation; either version 2 of the License, or (at your option) 
11
// any later version.
12
// 
13
// This program is distributed in the hope that it will be useful, but WITHOUT 
14
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
15
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
16
// more details.
17
// 
18
// You should have received a copy of the GNU General Public License along with
19
// this program; if not, write to the Free Software Foundation, Inc., 
20
// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21
//
22
// ----------------------------------------------------------------------------
23
//                                                                          
24
//####COPYRIGHTEND####
25
//=================================================================
26
//
27
//        X10.h
28
//
29
//        X10 class
30
//
31
//=================================================================
32
//=================================================================
33
//#####DESCRIPTIONBEGIN####
34
//
35
// Author(s):     sdf
36
// Contributors:  sdf
37
// Date:          1999-04-01
38
// Description:   Class to drive the X10 controller. This header file is host-independent.
39
// Usage:
40
//
41
//####DESCRIPTIONEND####
42
#ifndef _CX10_H
43
#define _CX10_H
44
#include "eCosSerial.h"
45
 
46
class CX10 {
47
public:
48
 
49
        CX10(LPCTSTR pszPort);
50
        virtual ~CX10();
51
        bool Power(bool bOn,int cControl1,int cControl2,int &nErr);     // Perform a reset on this port, with these control chars
52
        bool Ok(){return m_Serial.Ok();}
53
protected:
54
  CeCosSerial m_Serial;
55
        bool PutChar (unsigned char c);
56
        bool GetChar (unsigned char &c);
57
        bool ReceiveIPS();
58
  bool SetClock();
59
        bool Open();
60
        bool Close();
61
        LPCTSTR m_pszPort;
62
  bool Send( char c1, char c2,int &nErr);       // Send it these bytes and verify the returned checksum
63
};
64
#endif

powered by: WebSVN 2.1.0

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