procedure _usb_copy_array_to_ram_new(word in dst, byte in data[], byte in
num_bytes , byte out dummy[]) is
-- pragma inline
var byte index
-- dummy is accessed as a pointer, when calling this procedure give a
"var byte dummy_array[2]" to it, or any other byte array.
-- The content of "dummy" will not be altered, just the pointer
generated by passing it is used.
assembler -- move the "dummy" pointer to the destination
adress without telling the compiler
movfw dst
movwf dummy
movfw
dst +1
andlw 0b00111111 -- two highest bits must be 0 to indicate a
location in RAM
movwf dummy +1
end assembler
for num_bytes using index loop
dummy[index] = data[index]
end loop
end procedure
var byte dummy_array[2]
case endpoint of
0:
block
_usb_copy_array_to_ram_new( USB_EP0_IN_ADDR, data,
byte_cnt,dummy_array )
I was blindly copying Oliver's code as above, but was getting the error
type mismatch.
Need help as I am not able to follow the code.
Sunish
On Fri, Mar 29, 2013 at 8:51 PM, mattschinkel <[email protected]>wrote:
> Any luck getting this to work?
>
> --
> You received this message because you are subscribed to the Google Groups
> "jallib" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/jallib?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.