Header
Product Comparison: USB I2C | USB SPI | USB GPIO
  • My Account
  • Shopping Cart
  • Products
  • My Account
  • About
  • Products
  • PC-I2C/SPI/GPIO Adapters
  • Main Page
  • Classes
  • Files
  • File List
  • File Members

D:/_sources/u2c_12/ControlPanel/ControlPanelDoc.h

Go to the documentation of this file.
00001 // Copyright (C)2006 Diolan ( http://www.diolan.com )
00002 //
00003 // This program is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU General Public License
00005 // as published by the Free Software Foundation
00006 //
00007 // This program is distributed in the hope that it will be useful,
00008 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00009 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00010 // GNU General Public License for more details.
00011 
00012 
00013 #if !defined(AFX_CONTROLPANELDOC_H__0A3E5B6B_887C_11D7_A540_9BA47BC3D524__INCLUDED_)
00014 #define AFX_CONTROLPANELDOC_H__0A3E5B6B_887C_11D7_A540_9BA47BC3D524__INCLUDED_
00015 
00016 #if _MSC_VER > 1000
00017 #pragma once
00018 #endif // _MSC_VER > 1000
00019 
00020 class CControlPanelView;
00021 class CMainFrame;
00022 
00023 class CControlPanelDoc : public CDocument
00024 {
00025 protected:
00026         CControlPanelDoc();           // protected constructor used by dynamic creation
00027         DECLARE_DYNCREATE(CControlPanelDoc)
00028 
00029 // Attributes
00030 public:
00031         void OpenDevice();
00032 // Operations
00033 public:
00034         void InitView(CControlPanelView *pView) {m_pView = pView;};
00035 
00036 // Overrides
00037         // ClassWizard generated virtual function overrides
00038         //{{AFX_VIRTUAL(CControlPanelDoc)
00039         public:
00040         virtual void Serialize(CArchive& ar);   // overridden for document i/o
00041         protected:
00042         virtual BOOL OnNewDocument();
00043         //}}AFX_VIRTUAL
00044 
00045 // Implementation
00046 public:
00047         virtual ~CControlPanelDoc();
00048 #ifdef _DEBUG
00049         virtual void AssertValid() const;
00050         virtual void Dump(CDumpContext& dc) const;
00051 #endif
00052 
00053         // Generated message map functions
00054 protected:
00055         //{{AFX_MSG(CControlPanelDoc)
00056                 // NOTE - the ClassWizard will add and remove member functions here.
00057         //}}AFX_MSG
00058 
00059         afx_msg void OnI2cRead();
00060         afx_msg void OnI2cWrite();
00061 
00062         afx_msg void OnI2cStart();
00063         afx_msg void OnI2cRepeatedStart();
00064         afx_msg void OnI2cStop();
00065         afx_msg void OnI2cWriteByte();
00066         afx_msg void OnI2cReadByte();
00067         afx_msg void OnI2cGetAck();
00068         afx_msg void OnI2cPutAck();
00069 
00070         afx_msg void OnI2cReleaseScl();
00071         afx_msg void OnI2cDropScl();
00072         afx_msg void OnI2cReadScl();
00073         afx_msg void OnI2cReleaseSda();
00074         afx_msg void OnI2cDropSda();
00075         afx_msg void OnI2cReadSda();
00076 
00077         afx_msg void OnSpiReadWrite();
00078         afx_msg void OnSpiWrite();
00079         afx_msg void OnSpiRead();
00080 
00081         // Function will open the I2CBridge device, closing the old device if needed
00082         // If there are several device connected, user will choose the device to work with
00083         afx_msg void OnOpenDevice();
00084         afx_msg void OnGetSN();
00085         afx_msg void OnGetVersion();
00086         afx_msg void OnScanI2cSlave();
00087 
00088         DECLARE_MESSAGE_MAP()
00089 private:
00090         CControlPanelView *m_pView;
00091         CControlPanelView* GetView();
00092         CMainFrame* GetMainFrame();
00093         HANDLE m_hDevice;
00094         static const CString m_line_states[];
00095 
00096         BOOL m_UseSS;
00097         ULONG m_SSPin;
00098         BOOL m_ActiveHigh;
00099 
00100 public:
00101         afx_msg void OnOptionsI2cFrequency();
00102         afx_msg void OnOptionsSpiConfiguration();
00103 };
00104 
00106 
00107 //{{AFX_INSERT_LOCATION}}
00108 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00109 
00110 #endif // !defined(AFX_CONTROLPANELDOC_H__0A3E5B6B_887C_11D7_A540_9BA47BC3D524__INCLUDED_)
  • Products
  • PC-I2C/SPI/GPIO Adapters
  • Comparison
  • PC-I2C/SPI/GPIO Adapter DLN-1
  • USB-I2C/SPI/GPIO Adapter DLN-2
  • Multiprotocol Master DLN-4M
  • Multiprotocol Slave DLN-4S
  • Downloads
  • Software
  • Documentation
  • SW Tools & Examples
  • Development Boards
  • Open Source Projects
  • Discontinued Products
  • API Documentation
  • Downloads
  • SW Tools and Examples
footer top footer bottom
© Copyright Diolan 2006-2012