Discussion:
Read the SD presence
(too old to reply)
SteM
2010-05-27 12:59:57 UTC
Permalink
Hi all,
WinCE600 on Freescale iM25.
I'd like to read the presence of the SD in its slot from a win32 app.
I'm looking the ESDHC driver in the Freescale BSP and i see a function
called BspESDHCIsCardPresent().
How can i call it from an application?
Which API can i recall (i guess with a driver call) to achieve it?

I need it because after the boot my application checks the presence of a
file into the SD card.
It happens that with some SD cards (usually SD cards FAT32 formatted) the
file is not read.
Just to avoid to wait for too much time i'd like to wait only if a card is
inserted ...
--
SteM
Prabu[MCTS]
2010-05-27 13:17:43 UTC
Permalink
Check out this article

http://geekswithblogs.net/BruceEitman/archive/2008/06/13/windows-ce-monitoring-for-disk-insertion-to-add-support-for.aspx
--
Regards,
Prabu
http://prabukumar.wordpress.com/
www.e-consystems.com
Post by SteM
Hi all,
WinCE600 on Freescale iM25.
I'd like to read the presence of the SD in its slot from a win32 app.
I'm looking the ESDHC driver in the Freescale BSP and i see a function
called BspESDHCIsCardPresent().
How can i call it from an application?
Which API can i recall (i guess with a driver call) to achieve it?
I need it because after the boot my application checks the presence of a
file into the SD card.
It happens that with some SD cards (usually SD cards FAT32 formatted) the
file is not read.
Just to avoid to wait for too much time i'd like to wait only if a card is
inserted ...
--
SteM
SteM
2010-05-27 13:48:44 UTC
Permalink
Thanks,
but i only need to read a pin ..
--
SteM
Post by Prabu[MCTS]
Check out this article
http://geekswithblogs.net/BruceEitman/archive/2008/06/13/windows-ce-monitoring-for-disk-insertion-to-add-support-for.aspx
Post by Prabu[MCTS]
--
Regards,
Prabu
http://prabukumar.wordpress.com/
www.e-consystems.com
Post by SteM
Hi all,
WinCE600 on Freescale iM25.
I'd like to read the presence of the SD in its slot from a win32 app.
I'm looking the ESDHC driver in the Freescale BSP and i see a function
called BspESDHCIsCardPresent().
How can i call it from an application?
Which API can i recall (i guess with a driver call) to achieve it?
I need it because after the boot my application checks the presence of a
file into the SD card.
It happens that with some SD cards (usually SD cards FAT32 formatted) the
file is not read.
Just to avoid to wait for too much time i'd like to wait only if a card is
inserted ...
--
SteM
Prabu[MCTS]
2010-05-27 14:16:35 UTC
Permalink
The method described in that article is the right way for finding the disk
insertion in the application.

But if you want to get the only CD event in the application means,you can
create a named event in your SDHC driver and set that event when you get the
Card detect interrupt.Open the same event in the application and wait for
that event from the driver.
--
Regards,
Prabu
http://prabukumar.wordpress.com/
www.e-consystems.com
Post by SteM
Thanks,
but i only need to read a pin ..
--
SteM
Post by Prabu[MCTS]
Check out this article
http://geekswithblogs.net/BruceEitman/archive/2008/06/13/windows-ce-monitoring-for-disk-insertion-to-add-support-for.aspx
Post by Prabu[MCTS]
--
Regards,
Prabu
http://prabukumar.wordpress.com/
www.e-consystems.com
Post by SteM
Hi all,
WinCE600 on Freescale iM25.
I'd like to read the presence of the SD in its slot from a win32 app.
I'm looking the ESDHC driver in the Freescale BSP and i see a function
called BspESDHCIsCardPresent().
How can i call it from an application?
Which API can i recall (i guess with a driver call) to achieve it?
I need it because after the boot my application checks the presence of a
file into the SD card.
It happens that with some SD cards (usually SD cards FAT32 formatted)
the
Post by Prabu[MCTS]
Post by SteM
file is not read.
Just to avoid to wait for too much time i'd like to wait only if a card
is
Post by Prabu[MCTS]
Post by SteM
inserted ...
--
SteM
Bruce Eitman [eMVP]
2010-05-27 14:39:03 UTC
Permalink
No, you need to use the Win32 APIs that are available.

Now if your device vendor has provided a way to read the pin (which would
also be through a Win32 API), then go ahead and do that. With that said,
having a card present does not mean that you have a memory card, or that the
card has been mounted.
--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

Eurotech Inc.
www.Eurotech.com
Post by SteM
Thanks,
but i only need to read a pin ..
--
SteM
Post by Prabu[MCTS]
Check out this article
http://geekswithblogs.net/BruceEitman/archive/2008/06/13/windows-ce-monitoring-for-disk-insertion-to-add-support-for.aspx
Post by Prabu[MCTS]
--
Regards,
Prabu
http://prabukumar.wordpress.com/
www.e-consystems.com
Post by SteM
Hi all,
WinCE600 on Freescale iM25.
I'd like to read the presence of the SD in its slot from a win32 app.
I'm looking the ESDHC driver in the Freescale BSP and i see a function
called BspESDHCIsCardPresent().
How can i call it from an application?
Which API can i recall (i guess with a driver call) to achieve it?
I need it because after the boot my application checks the presence of a
file into the SD card.
It happens that with some SD cards (usually SD cards FAT32 formatted)
the
Post by Prabu[MCTS]
Post by SteM
file is not read.
Just to avoid to wait for too much time i'd like to wait only if a card
is
Post by Prabu[MCTS]
Post by SteM
inserted ...
--
SteM
Loading...