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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [ecostest/] [common/] [X10.h] - Blame information for rev 790

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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