Skip to content

Commit

Permalink
0.2.rev.A. Add EPROM 27xxx device
Browse files Browse the repository at this point in the history
  • Loading branch information
robsonsmartins committed Dec 23, 2023
1 parent fd19399 commit 0050e91
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 0 deletions.
2 changes: 2 additions & 0 deletions software/usbflashprog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ elseif(NORMAL_BUILD)
backend/devices/parallel/dummy.hpp
backend/devices/parallel/sram.cpp
backend/devices/parallel/sram.hpp
backend/devices/parallel/m27xxx.cpp
backend/devices/parallel/m27xxx.hpp
main/mainwindow.cpp
main/mainwindow.hpp
main/mainwindow.ui
Expand Down
55 changes: 55 additions & 0 deletions software/usbflashprog/backend/devices/parallel/m27xxx.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// ---------------------------------------------------------------------------
// USB EPROM/Flash Programmer
//
// Copyright (2023) Robson Martins
//
// This work is licensed under a Creative Commons Attribution-NonCommercial-
// ShareAlike 4.0 International License.
// ---------------------------------------------------------------------------
/**
* @ingroup Software
* @file backend/devices/parallel/m27xxx.cpp
* @brief Implementation of a Parallel EPROM 27xxx.
*
* @author Robson Martins (https://www.robsonmartins.com)
*/
// ---------------------------------------------------------------------------

#include "backend/devices/parallel/m27xxx.hpp"

// ---------------------------------------------------------------------------

M27xxx::M27xxx(QObject *parent) : SRAM(parent) {
info_.deviceType = kDeviceParallelMemory;
info_.name = "EPROM 27xxx";
info_.capability.hasRead = true;
info_.capability.hasProgram = true;
info_.capability.hasVerify = true;
info_.capability.hasBlankCheck = true;
info_.capability.hasVDD = true;
info_.capability.hasVPP = true;
skipFF_ = true;
twp_ = 3;
twc_ = 5;
vdd_ = 5.0f;
vpp_ = 13.0f;
size_ = 2048;
}

M27xxx::~M27xxx() {}

bool M27xxx::read(QByteArray &buffer) {
return false;
}

bool M27xxx::program(const QByteArray &buffer, bool verify) {
return false;
}

bool M27xxx::verify(const QByteArray &buffer) {
return false;
}

bool M27xxx::blankCheck() {
return false;
}
58 changes: 58 additions & 0 deletions software/usbflashprog/backend/devices/parallel/m27xxx.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// ---------------------------------------------------------------------------
// USB EPROM/Flash Programmer
//
// Copyright (2023) Robson Martins
//
// This work is licensed under a Creative Commons Attribution-NonCommercial-
// ShareAlike 4.0 International License.
// ---------------------------------------------------------------------------
/**
* @ingroup Software
* @file backend/devices/parallel/m27xxx.hpp
* @brief Class of a Parallel EPROM 27xxx.
*
* @author Robson Martins (https://www.robsonmartins.com)
*/
// ---------------------------------------------------------------------------

#ifndef BACKEND_DEVICES_PARALLEL_M27XXX_HPP_
#define BACKEND_DEVICES_PARALLEL_M27XXX_HPP_

// ---------------------------------------------------------------------------

#include <QObject>
#include <QString>
#include <QByteArray>

#include "sram.hpp"

// ---------------------------------------------------------------------------

/**
* @ingroup Software
* @brief Parallel EPROM 27xxx Class
* @details The purpose of this class is to program EPROM 27xxx Memories.
* @nosubgrouping
*/
class M27xxx : public SRAM {
Q_OBJECT

public:
/**
* @brief Constructor.
* @param parent Pointer to parent object. Default is nullptr.
*/
explicit M27xxx(QObject *parent = nullptr);
/** @brief Destructor. */
virtual ~M27xxx();
/* Reimplemented */
virtual bool read(QByteArray &buffer);
/* Reimplemented */
virtual bool program(const QByteArray &buffer, bool verify = false);
/* Reimplemented */
virtual bool verify(const QByteArray &buffer);
/* Reimplemented */
virtual bool blankCheck();
};

#endif // BACKEND_DEVICES_PARALLEL_M27XXX_HPP_

0 comments on commit 0050e91

Please sign in to comment.