Skip to content

Commit

Permalink
Final clean-up on sys io filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
josesimoes committed Jul 23, 2024
1 parent 3a49985 commit 340d9b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 121 deletions.
2 changes: 1 addition & 1 deletion CMake/Modules/FindSystem.IO.FileSystem.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(System.IO.FileSystem_SRCS

nf_sys_io_filesystem.cpp

nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard__.cpp
nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard_stubs.cpp
nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard.cpp
nf_sys_io_filesystem_System_IO_Directory.cpp
nf_sys_io_filesystem_System_IO_DriveInfo.cpp
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

#include "nf_sys_io_filesystem.h"

HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::InitNative___VOID( CLR_RT_StackFrame &stack )
__nfweak HRESULT
Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::InitNative___VOID(CLR_RT_StackFrame &stack)
{
NANOCLR_HEADER();

Expand All @@ -14,7 +15,8 @@ HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::
NANOCLR_NOCLEANUP();
}

HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::NativeDispose___VOID( CLR_RT_StackFrame &stack )
__nfweak HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::NativeDispose___VOID(
CLR_RT_StackFrame &stack)
{
NANOCLR_HEADER();

Expand All @@ -23,7 +25,8 @@ HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::
NANOCLR_NOCLEANUP();
}

HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::MountNative___VOID( CLR_RT_StackFrame &stack )
__nfweak HRESULT
Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::MountNative___VOID(CLR_RT_StackFrame &stack)
{
NANOCLR_HEADER();

Expand All @@ -32,7 +35,8 @@ HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::
NANOCLR_NOCLEANUP();
}

HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::UnmountNative___VOID( CLR_RT_StackFrame &stack )
__nfweak HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::UnmountNative___VOID(
CLR_RT_StackFrame &stack)
{
NANOCLR_HEADER();

Expand All @@ -41,7 +45,8 @@ HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::
NANOCLR_NOCLEANUP();
}

HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::PollCardDetectNative___BOOLEAN( CLR_RT_StackFrame &stack )
__nfweak HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::PollCardDetectNative___BOOLEAN(
CLR_RT_StackFrame &stack)
{
NANOCLR_HEADER();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,65 +16,6 @@ void postManagedStorageEvent(bool pinState, uint32_t driveIndex)
PostManagedEvent(EVENT_STORAGE, 0, GetStorageEventType(pinState), driveIndex);
}

// void cardDetect_interrupt(GPIO_PIN Pin, bool pinState, void *pArg)
// {
// (void)Pin;

// postManagedStorageEvent(pinState, (uint32_t)pArg);
// }

// // Reserve all MMC pins
// // CMD, Data0, Data1, Data2, Data3
// int8_t pins4bit[] = {15, 2, 4, 12, 13};
// // CMD, Data0
// int8_t pins1bit[] = {15, 2};

// void GetMMCPins(bool _1bit, int *count, int8_t **pPins)
// {
// if (_1bit)
// {
// *pPins = pins1bit;
// *count = sizeof(pins1bit);
// }
// else
// {
// *pPins = pins4bit;
// *count = sizeof(pins4bit);
// }
// }

// void UnReservePins(int count, int8_t *pPins)
// {
// for (int index = count - 1; index >= 0; index--)
// {
// CPU_GPIO_ReservePin((GPIO_PIN)pPins[index], false);
// }
// }

// bool TryReservePins(int count, int8_t *pPins)
// {
// int index = 0;
// bool failed = false;

// for (index = 0; index < count; index++)
// {
// if (CPU_GPIO_ReservePin((int8_t)pPins[index], true) == false)
// {
// failed = true;
// break;
// }
// }

// // If we failed then UnReserve pins already reserved
// if (failed)
// {
// UnReservePins(index - 1, pPins);
// return false;
// }

// return true;
// }

HRESULT Library_nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard::InitNative___VOID(
CLR_RT_StackFrame &stack)
{
Expand Down

0 comments on commit 340d9b1

Please sign in to comment.