Comments (6)
Related to #1447 for the alternative way. Which indeed should be the best because with the ESP32 family, we now have various pins depending on the platform. So, it should be parameterized.
from home.
I'm happy to work on this but it looks like nanoframework/nf-interpreter#2829 is close so I'll wait for that to get merged first.
from home.
This requires some thinking about the feature design. So far we've been trying (and succedded) in NOT having platform specific stuff in the "general" class libraries. The platform specifics are all in the various nanoFramework.NNNN
.
Worth give it some though before we decide how to implement this.
from home.
@Ellerbach I'm not sure that this is directly related to #1447.
@josesimoes was your comment meant for #1447?
This doesn't appear to be platform specific but rather specific to the hardware implementation. We're assuming that the card detect pin has a mode of InputPullUp. However there is nothing preventing the user from using an InputPullDown pin.
Additionally I don't believe that we can infer what LOW or HIGH represent with relation to the physical card state as this input doesn't necessarily even need to be directly related to SD card slot.
from home.
@CoryCharlton you are correct. I've added the above comment thinking about #1447... 🤦🏻♂️
Despite that it's also valid for the detect pin.
Adding to the above, but I get it that this could be a bit more tricky to implement, I would like to see for ESP32 the same implementation that the STM32 devices have: the card detection GPIO is handled internally, and the mounting takes place auto-magically after insertion. This frees the developer from the hassle of having to programatically call the mount operation, which is something that's most obviously going to happen. Note that the storage device inserted event is still fired, of course.
from home.
@josesimoes I'm not clear how the SDCard is handled in the STM32 devices as I'm unable to find an implementation of nanoFramework.System.IO.FileSystem.SDCard
in any target other than ESP32.
I'm assuming that SDCard
is not used in the STM32 devices and instead the drive is just automatically mounted like you mention (I think I see evidence of that here.
If that's the case then I think the STM32 implementation is incorrect (or at least doesn't cover all use cases). A card detect pin does not need to be attached in order for an SD card to function. I have several SD card modules that do not even expose a card detect pin.
Even for the modules that do expose a card detect pin I often don't bother wasting a GPIO for it because my use cases have always required that an SD card be available. I handle this during application initialization and fail if it does not mount.
Long story short we can't rely on card detect for mounting. SDCard could be extended to auto-mount but I think it should still be configurable as there may be use cases where manual mounting is preferred.
I'll start a conversation in Discord to get more input into this. Link
from home.
Related Issues (20)
- NanoDeviceOperations.Dispose() breaks functionality of subsequent NanoDeviceOperations instantiations HOT 1
- Failing Unit Tests in nanoframework.System.Net.Http
- License Link missing HOT 1
- Failing build docker.all v2.45 HOT 3
- Build Project Error HOT 4
- `HostBuilder.Properties` and `HostBuilderContext.Properties` should be dictionaries not arrays HOT 4
- Wifi support disappeared after upgrade to ESP32-C3-REV3 1.9.1.52 HOT 3
- Modbus library does not work with RS232 HOT 14
- Add support for IL0373 epaper driver HOT 2
- Modbus library will skip first byte received HOT 6
- Support ESP32_S3 Octal SPIRAM HOT 6
- ESP32 - nanoFramework.Json.DeserializationException HOT 12
- Serial port broken on XIAO ESP32C3 after upgrade from 1.9.1.7 HOT 2
- Error on ESP32S3 since nanoff updated to 2.5.66
- Problems with 96x16 OLED display
- Missing icons in Device Explorer HOT 1
- Double to string conversion problem HOT 5
- `DateTime.Parse` does not handle string that conform to RFC 3339 HOT 2
- I2cDevice is throwing an ArgumentException for busId=2 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home.