?? dspic.h
字號:
//DSPIC.h
//CdsPIC is a class created to drive the 4MHz PIC16LF628-04/SO code
//that was written to provide an RS232 to 2-wire or Bit I/O Interface
//Requires DSIOLIB1.h and DSIOLIB.cpp to be included in project
//Jason Rauch
//March 25, 2002
//***************************************************************************
//---------------------------------------------------------------------------
// Copyright (C) 2002 Dallas Semiconductor Corporation, All Rights Reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES
// OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
//
// Except as contained in this notice, the name of Dallas Semiconductor
// shall not be used except as stated in the Dallas Semiconductor
// Branding Policy.
class CdsPic
{
public:
CdsPic();
~CdsPic();
// Board Detect and Reset Routines
bool DetectBoard(char *port); // detects board on power-up
bool ResetBoard(); // Resets board via software
bool BoardPresent(); // Reports if Board is Present based
// on power-up detect variable
UCHAR * HardwareRevision(); // Points to String identifying
// the hardware revision
//2-Wire Routines
bool Start2W();
bool WriteSlave2W(UCHAR data);
bool ReadSlave2W(UCHAR &data, bool ACK);
bool Stop2W();
bool ToggleSCL9x();
bool Write1(bool state);
bool Write2(bool state);
bool Write3(bool state);
bool Write4(bool state);
bool Write5(bool state);
bool Write6(bool state);
bool Write7(bool state);
bool Write8(bool state);
bool Write9(bool state);
bool Write10(bool state);
bool Write11(bool state);
bool Read1(bool &state);
bool Read2(bool &state);
bool Read3(bool &state);
bool Read4(bool &state);
bool Read5(bool &state);
bool Read6(bool &state);
bool Read7(bool &state);
bool Read8(bool &state);
bool Read9(bool &state);
bool Read10(bool &state);
bool Read11(bool &state);
private:
bool m_bComIsOpen;
bool m_bBoardPresent;
UCHAR m_strBoardBanner[20];
};
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -