punjaclpt.cpp

来自「pc loader for 8051 based microcomputers」· C++ 代码 · 共 59 行

CPP
59
字号
// PunjacLPT.cpp: implementation of the CPunjacLPT class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PunjacLPT.h"

#include "../PL3000/I2CComm.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CPunjacLPT::CPunjacLPT(CI2CComm* pI2Ckomunikator)
: pI2Ckomunikator_m(pI2Ckomunikator)
{
}

CPunjacLPT::~CPunjacLPT()
{
}

bool CPunjacLPT::Start(
    PRG::tAdresa pocetnaAdresa,
    PRG::tAdresa zavrsnaAdresa,
    std::string& opis
    )
{
    PostaviOpsegAdresa(pocetnaAdresa, zavrsnaAdresa);
    tekucaAdresa_m = PocetnaAdresaOpsega();

    return true;
}

bool CPunjacLPT::DajSledeciBajt(PRG::tBajt& bajt, PRG::tAdresa& adresa)
{
    if (!PrazanOpsegAdresa() && AdresaUZadatomOpsegu(tekucaAdresa_m)) {
        if (!pI2Ckomunikator_m->ProcitajBajt(bajt, tekucaAdresa_m)) {
            throw CPunjacException(pI2Ckomunikator_m->OpisGreske());
        }
        adresa = tekucaAdresa_m;
        ++tekucaAdresa_m;

        return true;
    }

    return false;
}

bool CPunjacLPT::Stop(std::string& opis)
{
    return true;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?