Skip to content

Commit 06e85ec

Browse files
committed
docs/uctype: Update for constructor argument order changes.
Also, other small cleanups/improvements.
1 parent 1679696 commit 06e85ec

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

docs/library/uctypes.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,15 @@ Following are encoding examples for various field types:
9696
Module contents
9797
---------------
9898

99-
.. class:: struct(descriptor, addr, layout_type=NATIVE)
99+
.. class:: struct(addr, descriptor, layout_type=NATIVE)
100100

101-
Instantiate a "foreign data structure" object based on structure descriptor
102-
(encoded as a dictionary), layout type (see below), and actual structure
103-
address.
101+
Instantiate a "foreign data structure" object based on structure address in
102+
memory, descriptor (encoded as a dictionary), and layout type (see below).
104103

105104
.. data:: LITTLE_ENDIAN
106105

107106
Little-endian packed structure. (Packed means that every field occupies
108-
exactly many bytes as defined in the descriptor, i.e. alignment is 1).
107+
exactly as many bytes as defined in the descriptor, i.e. alignment is 1).
109108

110109
.. data:: BIG_ENDIAN
111110

@@ -114,12 +113,12 @@ Module contents
114113
.. data:: NATIVE
115114

116115
Native structure - with data endianness and alignment conforming to
117-
the target ABI.
116+
the ABI of the system on which MicroPython runs.
118117

119118
.. function:: sizeof(struct)
120119

121120
Return size of data structure in bytes. Argument can be either structure
122-
class or specific instantiated structure object (or its field).
121+
class or specific instantiated structure object (or its aggregate field).
123122

124123
.. function:: addressof(obj)
125124

0 commit comments

Comments
 (0)