Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IODMACommand help needed



Hi Peter

I don't know the answers to all of your questions, but I'll try to answer what I do know.

IODMACommand::withSpecification() will requires a static C++ function as the first argument. I currently use the provided kIODMACommandOutputHost32, which is defined as

class IODMACommand : public IOCommand
{
...
    #define kIODMACommandOutputHost32   (IODMACommand::OutputHost32)

    static bool OutputHost32(IODMACommand *target,
        Segment64 seg, void *segs, UInt32 ind);
};

So, in theory at least, you should be able to provide your own function.

I then call gen32IOVMSegments thus:

        UInt64 offset = 0;
        IODMACommand::Segment32 segments[1];
        UInt32 numSeg = 1;
        result = cmd->gen32IOVMSegments(&offset, &segments[0], &numSeg);


So my sequence is something like (obviously with error checking etc)

mem = IOMemoryDescriptor::withAddress()
cmd = IODMACommand::withSpecification(....)
cmd->setMemoryDescriptor(mem, false)
cmd->prepare()
cmd->gen32IOVMSegments()
cmd->complete()
cmd->clearMemoryDescriptor(false)
cmd->release()

cheers
peter




Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for your free account today.
 _______________________________________________
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



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.