/*************************************************************************** * Copyright (C) 2003-2005 Alain Gibaud * * Copyright (C) 2006 Nicolas Hadacek * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ #include "direct_baseline.h" //---------------------------------------------------------------------------- bool Direct::Baseline::gotoMemory(Pic::MemoryRangeType type) { switch (type.type()) { case Pic::MemoryRangeType::Config: return true; case Pic::MemoryRangeType::Eeprom: return true; case Pic::MemoryRangeType::Code: case Pic::MemoryRangeType::Cal: case Pic::MemoryRangeType::UserId: case Pic::MemoryRangeType::CalBackup: return incrementPC(device().range(type).start.toUInt()+1); case Pic::MemoryRangeType::DeviceId: case Pic::MemoryRangeType::DebugVector: case Pic::MemoryRangeType::HardwareStack: case Pic::MemoryRangeType::ProgramExecutive: case Pic::MemoryRangeType::Nb_Types: break; } Q_ASSERT(false); return false; } //----------------------------------------------------------------------------- bool Direct::P12C5XX::writeWords(Pic::MemoryRangeType type, const Device::Array &data, uint i) { BitValue word = data[i]; // config requires a total of 10ms Pulses == 100 x 100 us uint total = (type==Pic::MemoryRangeType::Config ? 100 : 8); uint n = 0; for (; n