watlers world wrote:unction Linear(P: pointer): longint;
{ Return the pointer as a linear longint value }
begin
Linear := (longint(seg(P^)) shl 4) + ofs(P^)
end;
"
this is what you do with the seg/ofs then?
watlers world wrote:GlobalDosAlloc returns a segment value and a selector value.
Uses the segment value as you would under DOS to calculate
a physical address -- shift left by 4. Program this value into the
controller's base address register, just like under DOS.
this creates a 24bit linear address to program the DMA controller with
(though its held in a 32bit variable)
is this the sort of physical address usbuhci can take?
watlers world wrote:I asume data is placed in the first few bytes of the segment
watlers world wrote:since I'm using a low speed device
should I set datasize to 8 bytes ?
b64.I14RFlags:=I14RFlagShortPktOK; Probably not a good idea -- better for flags to be 0 (unless you're using a physical data address)
b64.I14RDataSize:=18; Is not needed, but doesn't hurt anything
b64.I14RSetupValue:=$FF; Needs to be $0100
b64.I14RSetupIndex:=3; Needs to be 0
Users browsing this forum: No registered users and 0 guests