mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
platform: add support for the EZ-Flash Parallel
This commit is contained in:
33
arm9/source/patches/platform/ezp/EZPLoaderPlatform.h
Normal file
33
arm9/source/patches/platform/ezp/EZPLoaderPlatform.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include "common.h"
|
||||
#include "../LoaderPlatform.h"
|
||||
#include "ezpReadSectorsAsm.h"
|
||||
#include "ezpReadSdDataAsm.h"
|
||||
#include "ezpWriteSectorsAsm.h"
|
||||
|
||||
/// @brief Implementation of LoaderPlatform for the EZ-Flash Parallel flashcard
|
||||
class EZPLoaderPlatform : public LoaderPlatform
|
||||
{
|
||||
public:
|
||||
const SdReadPatchCode* CreateSdReadPatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new EZPReadSectorsPatchCode(patchHeap,
|
||||
patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new EZPReadSDDataPatchCode(patchHeap);
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
const SdWritePatchCode* CreateSdWritePatchCode(
|
||||
PatchCodeCollection& patchCodeCollection, PatchHeap& patchHeap) const override
|
||||
{
|
||||
return patchCodeCollection.GetOrAddSharedPatchCode([&]
|
||||
{
|
||||
return new EZPWriteSectorsPatchCode(patchHeap);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user