Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
438c0dc2
Commit
438c0dc2
authored
Nov 13, 2019
by
Jim Mussared
Committed by
Damien George
Nov 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extmod/modbluetooh_nimble: Fix UUID conversion for 16 and 32 bit values.
parent
2ae755d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
extmod/modbluetooth_nimble.c
extmod/modbluetooth_nimble.c
+4
-4
No files found.
extmod/modbluetooth_nimble.c
View file @
438c0dc2
...
...
@@ -117,14 +117,14 @@ STATIC mp_obj_bluetooth_uuid_t create_mp_uuid(const ble_uuid_any_t *uuid) {
case
BLE_UUID_TYPE_16
:
result
.
type
=
MP_BLUETOOTH_UUID_TYPE_16
;
result
.
data
[
0
]
=
uuid
->
u16
.
value
&
0xff
;
result
.
data
[
1
]
=
(
uuid
->
u16
.
value
<<
8
)
&
0xff
;
result
.
data
[
1
]
=
(
uuid
->
u16
.
value
>>
8
)
&
0xff
;
break
;
case
BLE_UUID_TYPE_32
:
result
.
type
=
MP_BLUETOOTH_UUID_TYPE_32
;
result
.
data
[
0
]
=
uuid
->
u32
.
value
&
0xff
;
result
.
data
[
1
]
=
(
uuid
->
u32
.
value
<<
8
)
&
0xff
;
result
.
data
[
2
]
=
(
uuid
->
u32
.
value
<<
16
)
&
0xff
;
result
.
data
[
3
]
=
(
uuid
->
u32
.
value
<<
24
)
&
0xff
;
result
.
data
[
1
]
=
(
uuid
->
u32
.
value
>>
8
)
&
0xff
;
result
.
data
[
2
]
=
(
uuid
->
u32
.
value
>>
16
)
&
0xff
;
result
.
data
[
3
]
=
(
uuid
->
u32
.
value
>>
24
)
&
0xff
;
break
;
case
BLE_UUID_TYPE_128
:
result
.
type
=
MP_BLUETOOTH_UUID_TYPE_128
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment