mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Refactored platform code to use interfaces for patch code with a special feature and improved patch code file names
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "../LoaderPlatform.h"
|
||||
#include "DatelSpiCommandsAsm.h"
|
||||
#include "DatelReadSectorsAsm.h"
|
||||
#include "DatelWriteSectorsAsm.h"
|
||||
#include "DatelSendSdioCommandPatchCode.h"
|
||||
#include "DatelReadSdPatchCode.h"
|
||||
#include "DatelWriteSdPatchCode.h"
|
||||
|
||||
/// @brief Implementation of LoaderPlatform for the DATEL line of flashcarts
|
||||
class DatelLoaderPlatform : public LoaderPlatform
|
||||
{
|
||||
public:
|
||||
const SdReadPatchCode* CreateSdReadPatchCode(
|
||||
const IReadSectorsPatchCode* CreateSdReadPatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
auto spi = patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
@@ -18,7 +17,7 @@ public:
|
||||
});
|
||||
auto sendSdio = patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new DatelSendSDIOCommandPatchCode(patchHeap, spi);
|
||||
return new DatelSendSdioCommandPatchCode(patchHeap, spi);
|
||||
});
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
@@ -26,7 +25,7 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
const SdWritePatchCode* CreateSdWritePatchCode(
|
||||
const IWriteSectorsPatchCode* CreateSdWritePatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
auto spi = patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
@@ -35,7 +34,7 @@ public:
|
||||
});
|
||||
auto sendSdio = patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new DatelSendSDIOCommandPatchCode(patchHeap, spi);
|
||||
return new DatelSendSdioCommandPatchCode(patchHeap, spi);
|
||||
});
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user