diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-03-27 00:18:30 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-03-27 00:19:23 +0200 |
commit | c260836beb10b1d81c98732c2b7282eb6675140a (patch) | |
tree | 59df0d31525b86254bccf3eb8bcac819bb8b03cc | |
parent | 1eba62cac9473b69712effb3fa30bb3f9f9b6b1b (diff) | |
download | micropython-c260836beb10b1d81c98732c2b7282eb6675140a.tar.gz micropython-c260836beb10b1d81c98732c2b7282eb6675140a.zip |
docs: uctypes: Describe bytes_at(), bytearray_at().
-rw-r--r-- | docs/library/uctypes.rst | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/docs/library/uctypes.rst b/docs/library/uctypes.rst index 322946072d..d7ebc7b7d5 100644 --- a/docs/library/uctypes.rst +++ b/docs/library/uctypes.rst @@ -126,7 +126,19 @@ Module contents other object supporting buffer protocol (and address of this buffer is what actually returned). -(to be continued) +.. function:: bytes_at(addr, size) + + Capture memory at the given address and size as bytes object. As bytes + object is immutable, memory is actually duplicated and copied into + bytes object, so if memory contents change later, created object + retains original value. + +.. function:: bytearray_at(addr, size) + + Capture memory at the given address and size as bytearray object. + Unlike bytes_at() function above, memory is captured by reference, + so it can be both written too, and you will access current value + at the given memory address. Structure objects ----------------- |