Skip to content

Commit 3aa6ab7

Browse files
networkfusionjosesimoesnfbot
authored
Remove deprecated Windows.Storage API (#3090)
Co-authored-by: José Simões <jose.simoes@eclo.solutions> Co-authored-by: nfbot[bot] <nanoframework@outlook.com>
1 parent 5013725 commit 3aa6ab7

File tree

53 files changed

+193
-3097
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+193
-3097
lines changed

CMake/Modules/FindNF_NativeAssemblies.cmake

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ option(API_System.Device.Pwm "option for System.Devic
2929
option(API_System.IO.Ports "option for System.IO.Ports API")
3030
option(API_System.Device.Spi "option for System.Device.Spi API")
3131
option(API_System.Runtime.Serialization "option for System.Runtime.Serialization API")
32-
option(API_Windows.Storage "option for Windows.Storage")
3332
option(API_nanoFramework.Graphics "option for nanoFramework.Graphics")
3433
option(API_nanoFramework.Device.Bluetooth "option for nanoFramework.Device.Bluetooth")
3534
option(API_System.Device.UsbStream "option for System.Device.UsbStream API")
@@ -453,12 +452,6 @@ if(API_System.Device.UsbStream)
453452
PerformSettingsForApiEntry("System.Device.UsbStream")
454453
endif()
455454

456-
# Windows.Storage
457-
if(API_Windows.Storage)
458-
##### API name here (doted name)
459-
PerformSettingsForApiEntry("Windows.Storage")
460-
endif()
461-
462455
# Interop assemblies
463456
ParseInteropAssemblies()
464457

CMake/Modules/FindSystem.IO.FileSystem.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ set(BASE_PATH_FOR_THIS_MODULE ${BASE_PATH_FOR_CLASS_LIBRARIES_MODULES}/System.IO
88

99
if(RTOS_FREERTOS_CHECK)
1010
set(PROJECT_COMMON_PATH ${PROJECT_SOURCE_DIR}/targets/FreeRTOS/NXP/_common)
11+
set(FATFS_PLATFORM ${PROJECT_SOURCE_DIR}/targets/FreeRTOS/NXP/_FatFs)
1112
else()
1213
set(PROJECT_COMMON_PATH ${PROJECT_SOURCE_DIR}/targets/${RTOS}/_common)
1314
endif()
@@ -75,6 +76,7 @@ foreach(SRC_FILE ${System.IO.FileSystem_SRCS})
7576

7677
# FatFs
7778
${CMAKE_SOURCE_DIR}/targets/${RTOS}/_FatFs
79+
${FATFS_PLATFORM}
7880

7981
CMAKE_FIND_ROOT_PATH_BOTH
8082
)

CMake/Modules/FindWindows.Storage.cmake

Lines changed: 0 additions & 63 deletions
This file was deleted.

CMake/Modules/FreeRTOS_IMXRT10xx_GCC_options.cmake

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ macro(nf_set_compile_options)
3333
# this series has FPU
3434
target_compile_definitions(${NFSCO_TARGET} PUBLIC -DPLATFORM_ARM -DCORTEX_USE_FPU=TRUE -DUSE_FPU=TRUE)
3535

36-
# temporarily force inclusion of Windows Storage headers
37-
target_compile_definitions(${NFSCO_TARGET} PUBLIC -DINCLUDE_WINDOWS_STORAGE)
3836
endmacro()
3937

4038

CMakeLists.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,11 @@ if(NF_FEATURE_HAS_SDCARD)
309309

310310
# this feature currently is supported only on ChibiOS, iMX.RT FreeRTOS and ESP32 FreeRTOS
311311
if(NOT RTOS_CHIBIOS_CHECK AND NOT RTOS_FREERTOS_CHECK AND NOT RTOS_ESP32_CHECK)
312-
message(FATAL_ERROR "Support for SD Card is only available for ChibiOS Cortex-M targets, iMX.RT FreeRTOS and ESP32 targets..")
312+
message(FATAL_ERROR "Support for SD Card is only available for ChibiOS Cortex-M targets, iMX.RT FreeRTOS and ESP32 targets.")
313313
endif()
314314

315-
if(RTOS_FREERTOS_CHECK)
316-
# ONLY FOR FREERTOS+NXP force inclusion of Windows.Storage API
317-
set(API_Windows.Storage ON CACHE INTERNAL "Forcing Windows.Storage API option to ON")
318-
else()
319-
# all the others RTOSes: force inclusion of System.IO.FileSystem API
320-
set(API_System.IO.FileSystem ON CACHE INTERNAL "Forcing System.IO.FileSystem API option to ON")
321-
endif()
315+
# all RTOSes: force inclusion of System.IO.FileSystem API
316+
set(API_System.IO.FileSystem ON CACHE INTERNAL "Forcing System.IO.FileSystem API option to ON")
322317

323318
message(STATUS "Support for SD Card is included")
324319

@@ -668,7 +663,6 @@ if( API_nanoFramework.Device.OneWire OR
668663
API_System.Device.Gpio OR
669664
API_System.IO.Ports OR
670665
API_nanoFramework.Device.Can OR
671-
API_Windows.Storage OR
672666
API_System.IO.FileSystem)
673667

674668
# these APIs requires nanoFramework.Runtime.Events

src/HAL/Include/nanoHAL_System_IO_FileSystem.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ typedef enum StorageEventType
4848
#define DRIVE_LETTER_LENGTH sizeof(INDEX0_DRIVE_LETTER)
4949
#define DRIVE_PATH_LENGTH sizeof(INDEX0_DRIVE_PATH)
5050

51-
/////////////////////////////////////////////////////////////////////////////////////////
52-
// !!! KEEP IN SYNC WITH Windows.Storage.CreationCollisionOption (in managed code) !!! //
53-
/////////////////////////////////////////////////////////////////////////////////////////
54-
55-
enum CreationCollisionOption
56-
{
57-
CreationCollisionOption_GenerateUniqueName = 0,
58-
CreationCollisionOption_ReplaceExisting,
59-
CreationCollisionOption_FailIfExists,
60-
CreationCollisionOption_OpenIfExists
61-
};
62-
6351
#ifdef __cplusplus
6452
extern "C"
6553
{

src/HAL/Include/nanoHAL_Windows_Storage.h

Lines changed: 0 additions & 74 deletions
This file was deleted.

src/HAL/Include/nanoHAL_v2.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,6 @@ extern "C"
414414
#include <nanoHAL_Watchdog.h>
415415
#include <nanoHAL_Rtos.h>
416416

417-
#ifdef INCLUDE_WINDOWS_STORAGE
418-
#include <nanoHAL_Windows_Storage.h>
419-
#else
420417
#include <nanoHAL_System_IO_FileSystem.h>
421-
#endif
422418

423419
#endif // NANOHAL_V2_H

src/System.IO.FileSystem/nf_sys_io_filesystem_System_IO_File.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include "nf_sys_io_filesystem.h"
77

88
#include <ff.h>
9-
#include <nanoHAL_Windows_Storage.h>
109

1110
extern SYSTEMTIME GetDateTime(uint16_t date, uint16_t time);
1211
extern void CombinePathAndName(char *outpath, const char *path1, const char *path2);

0 commit comments

Comments
 (0)