| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Reggie --
Yes, it is the best choice.
Override the virtual functions, yes. After you allocate, init, and attach your subclass of IOBlockStorageDevice, all you need to do is call registerService() on it. IOKit will handle the rest. Something like this (error checking removed for brevity): IOService * mySubclass = OSTypeAlloc ( MySubclass ); mySubclass->init(); mySubclass->attach ( this ); mySubclass->registerService(); mySubclass->release();
There's no reason to separate your driver into two layers if it's not required. By following the example above (with added error checking), IOKit will find your subclass of IOBlockStorageDevice and match the appropriate driver (IOBlockStorageDriver). IOBlockStorageDriver will make calls into your IOBlockStorageDevice subclass to find out the media block size, number of blocks, etc.
Good luck! -- Chris ------------------ 6 Infinite Loop M/S 306-2MS Cupertino CA 95014 phone: (408) 974-4033 fax: (408) 862-7577 email: email@hidden |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-drivers mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-drivers/email@hidden This email sent to email@hidden
| References: | |
| >SDHCI Driver (From: Reggie McMurtrey <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.