Main Site Documentation

Is SdCardStorageController implemented - TinyCLR 1.0


#1

Using: UCM Dev Board Rev E, UC5550, UD700 Rev A
Library TinyCLR 1.0

I tried the following:

var sd = StorageController.FromName(@“GHIElectronics.TinyCLR.NativeApis.STM32F7.SdCardStorageController\0”);
Received ‘System.InvalidOperationException’

var sd = StorageController.FromName(“GHIElectronics.TinyCLR.NativeApis.STM32F7.SdCardStorageController\0”);
Received ‘System.NullReferenceException’

var drive = FileSystem.Mount(sd.Hdc);

Returned from VS 2017 Watch info
var q = GHIElectronics.TinyCLR.Native.Api.FindAll();
Returns a array of 45 items (0 to 44)

[31] {GHIElectronics.TinyCLR.Native.Api} GHIElectronics.TinyCLR.Native.Api
Author “GHI Electronics, LLC” string
Implementation 536948392 System.IntPtr
Name “GHIElectronics.TinyCLR.NativeApis.STM32F7.SdCardStorageController\0” string
State 536948356 System.IntPtr
Type StorageController GHIElectronics.TinyCLR.Native.ApiType
Version 0 ulong
Static members

Thank You…


#2

The first one is correct.

var sd = StorageController.FromName(@"GHIElectronics.TinyCLR.NativeApis.STM32F7.SdCardStorageController\0");

Try to format the card as FAT/FAT32 by Window first.


#3

Dat_Tran

Using the @“string” worked for SdCardStorageController

However if I use the @ for:
/Uart1 = UartController.FromName(@“GHIElectronics.TinyCLR.NativeApis.STM32F7.UartController\0”);
I receive ‘System.NullReferenceException’

Not using the @ Works for
Uart1 = UartController.FromName(“GHIElectronics.TinyCLR.NativeApis.STM32F7.UartController\0”);

So I am not sure what string format to use for all.

Have a great day!