In message <[EMAIL PROTECTED]> "Justin T. Gibbs" writes:
: >That's what I mean. You call this, and it will remap the CIS (if it
: >has been unmapped), walk it for you and pass you a pointer to each CIS
: >entry one at a time to the function you specify.
: >
: >Warner
:
: I'd rather have a seek/read interface than have a callback.
The problem with a read/seek interface is that you are consuming a
resource (a memory window) while you are using it. You'd need an
open/close on top of that as well to properly map things in to start
and then free them at the end. Plus you might want a ftell sort of
interface as well. I'll likely punt on the seek/ftell part.
But it would make the client code a little easier to cope with:
uchar8_t cis[CIS_MAX_LENGTH];
size_t len;
cis_cookie_t cookie;
card_map_cis(dev, &cookie);
while (card_read_cis(dev, cookie, cis, &len)) {
frob the cis entry
}
card_unmap_cis(dev, cookie);
I'll see how hard it would be to come up with this, if this sort of
interface is reasonable.
Warner
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message