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/SpiConfigDlg.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 #pragma once
00013 
00014 bool ConfigureSpi(HANDLE hDevice, BOOL* pUseSS, ULONG* pSSPin, BOOL* pActiveHigh);
00015 // CSpiConfigDlg dialog
00016 
00017 class CSpiConfigDlg : public CDialog
00018 {
00019         DECLARE_DYNAMIC(CSpiConfigDlg)
00020 
00021 public:
00022         BOOL m_UseSS;
00023     ULONG m_SSPin;
00024         BOOL m_ActiveHigh;
00025         CSpiConfigDlg(CWnd* pParent = NULL);   // standard constructor
00026         CSpiConfigDlg(HANDLE hDevice, BYTE Cpol, BYTE Cpha, BYTE Freq, BOOL UseSS, ULONG SSPin, BOOL ActiveHigh);   
00027         virtual ~CSpiConfigDlg();
00028 
00029 // Dialog Data
00030         enum { IDD = IDD_SPICONFIGDLG };
00031 
00032 protected:
00033         virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
00034 
00035         DECLARE_MESSAGE_MAP()
00036 public:
00037         CComboBox m_SpiFreq;
00038 private:
00039         BYTE m_Cpol, m_Cpha;
00040         BYTE m_Freq;
00041         HANDLE m_hDevice;
00042         struct SSpiFreq
00043         {
00044                 char* m_Text;
00045                 BYTE m_Value;
00046         };
00047         static SSpiFreq sm_Freq[];
00048         bool Apply();
00049 public:
00050         virtual BOOL OnInitDialog();
00051         afx_msg void OnBnClickedApply();
00052         afx_msg void OnChangeSetting();
00053         afx_msg void OnBnClickedOk();
00054         afx_msg void OnBnClickedSs();
00055 };
  • 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