Get address of Long Array? #15899
-
Forgive me if this is obvious, having trouble figuring this out... Have an array like this: Would like to get the physical address of the array in the Heap, so can pass to a driver.... I've tried several things with uctypes, but can't get it to work... Looks like could create a structure with uctypes instead and get the address that way. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
uctypes.addressof(obj)
from
(https://docs.micropython.org/en/latest/library/uctypes.html#uctypes.addressof)
should work, even if you didn't create the object with uctypes, as long it has the buffer protocol (which your array does).