Re: How emulate re-insert PCMCIA card on platform CE.NET 4.1 by pietdesomere
pietdesomere
Wed Oct 06 09:48:59 CDT 2004
Actually we've been doing this for more than a year now by
manipulating the "card detect" bit. If you find the code in the card
bus driver that reports to your driver whether a card is inserted, AND
this with your own global "Enabled" parameter.
"Enabled" is FALSE on startup. The bus driver thinks there is no card
and doesn't power it up. Add a thread to the pcmcia bus driver that
toggles this "Enabled" parameter. When you set it to TRUE, the driver
thinks the card is inserted and loads the driver. When you set it to
FALSE, the driver will be unloaded. Set it to TRUE again and you'll
see the driver will reload.
You don't have to reboot (which would take a minute) or re-insert the
card (which on our device would take 15 minutes and a screwdriver).
It's not a massive rewrite, so it must be a gross hack :)
It works well, so I don't mind.
P
"Steve Maillet \(eMVP\)" <nospam1@EntelechyConsulting.com> wrote in message news:<O5C0CcvpEHA.3800@TK2MSFTNGP14.phx.gbl>...
> That cannot be done via software without a massive re-write or gross hack of
> the PCMCIA bus driver.