• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How eject (power off) a PC card from User Space
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How eject (power off) a PC card from User Space


  • Subject: Re: How eject (power off) a PC card from User Space
  • From: Martin Bestmann <email@hidden>
  • Date: Sat, 15 Jan 2005 10:00:50 +0100

Rick,

thanks very much that works great.
The other problem that I have is that I need to tell the cardbus/IOPCardBridge to look for cards already inside the slot and to activate them. Basically simulate an insert of a card. The reason for this is that the tool I'm writing is used for testing GSM PC Cards and the test suite requires to power off the card at a certain point and then activate the card again. Due to the fact that no one is sitting in front of the machine during the test to pull out the card and push it back in I need some call (to be called from User space) to tell the OS to research for cards already in the slot.


Thanks again for you help,

Martin

On 15.01.2005, at 02:05, Rick Sulack wrote:


On Jan 14, 2005, at 6:32 AM, Martin Bestmann wrote:

Hi,

I need to write a command line tool which simply ejects (powers off) a specific PC card which is in the PC card slot.
Basically I need the same functionality as the "PCCard.menu" extra when you choose "Power off Card" from the PC Card menu icon in the menu bar.
Does someone know how to do this?

this is from actual code:

info->service is of type io_object_t			

int
PCCardEjectCard(PCCardSocketHandle_t handle)
{
	IOReturn 			err = kIOReturnNoMemory;
	DeviceInfo * 		info = (DeviceInfo *)handle;
	CFMutableDictionaryRef  	ejectCommand;

printf("PCCardEjectCard called for socket %s (%p)\n", info->name, info);

	ejectCommand = CFDictionaryCreateMutable( kCFAllocatorDefault, 0,
					      &kCFTypeDictionaryKeyCallBacks,
					      &kCFTypeDictionaryValueCallBacks);

if (ejectCommand) {
CFDictionarySetValue(ejectCommand, CFSTR("eject request"), CFSTR("value ignored"));
err = IORegistryEntrySetCFProperties(info->service, ejectCommand);
}


	return err;
}

-rick
__
rick sulack
darwin core os group
apple computer, inc
--------------------------------------------------------------
"More computing sins are committed in the name of efficiency (without necessarily achieving it)
than for any other single reason - including blind stupidity" -Wulf 1972



_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >How eject (power off) a PC card from User Space (From: Martin Bestmann <email@hidden>)
 >Re: How eject (power off) a PC card from User Space (From: Rick Sulack <email@hidden>)

  • Prev by Date: Re: How eject (power off) a PC card from User Space
  • Next by Date: questions about MacOS X /Darwin internals related books
  • Previous by thread: Re: How eject (power off) a PC card from User Space
  • Next by thread: questions about MacOS X /Darwin internals related books
  • Index(es):
    • Date
    • Thread