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/I2cBusLevelBar.cpp

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 #include "stdafx.h"
00014 #include "ControlPanel.h"
00015 #include "I2cBusLevelBar.h"
00016 
00017 
00018 // CI2cBusLevelBar
00019 
00020 IMPLEMENT_DYNAMIC(CI2cBusLevelBar, CDialogBar)
00021 CI2cBusLevelBar::CI2cBusLevelBar()
00022 : m_bEnableControls(false)
00023 {
00024 }
00025 
00026 CI2cBusLevelBar::~CI2cBusLevelBar()
00027 {
00028 }
00029 
00030 
00031 BEGIN_MESSAGE_MAP(CI2cBusLevelBar, CDialogBar)
00032         ON_UPDATE_COMMAND_UI(IDC_I2C_RELEASE_SCL, OnUpdateButtons)
00033         ON_UPDATE_COMMAND_UI(IDC_I2C_DROP_SCL, OnUpdateButtons)
00034         ON_UPDATE_COMMAND_UI(IDC_I2C_READ_SCL, OnUpdateButtons)
00035         ON_UPDATE_COMMAND_UI(IDC_I2C_RELEASE_SDA, OnUpdateButtons)
00036         ON_UPDATE_COMMAND_UI(IDC_I2C_DROP_SDA, OnUpdateButtons)
00037         ON_UPDATE_COMMAND_UI(IDC_I2C_READ_SDA, OnUpdateButtons)
00038 END_MESSAGE_MAP()
00039 
00040 void CI2cBusLevelBar::EnableControls(bool bEnable)
00041 {
00042         m_bEnableControls = bEnable;
00043 }
00044 
00045 
00046 
00047 void CI2cBusLevelBar::OnUpdateButtons (CCmdUI* pCmdUI)
00048 {
00049         if(m_bEnableControls)
00050                 pCmdUI->Enable(TRUE);
00051         else
00052                 pCmdUI->Enable(FALSE);
00053 }
00054 
00055 
00056 // CI2cBusLevelBar message handlers
00057 
  • 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