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
24a8a408
Commit
24a8a408
authored
Feb 10, 2021
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extmod/btstack: Add stub functions for passkey, l2cap bindings.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
7535f67d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
extmod/btstack/modbluetooth_btstack.c
extmod/btstack/modbluetooth_btstack.c
+36
-0
No files found.
extmod/btstack/modbluetooth_btstack.c
View file @
24a8a408
...
...
@@ -1168,11 +1168,18 @@ int mp_bluetooth_gap_disconnect(uint16_t conn_handle) {
}
#if MICROPY_PY_BLUETOOTH_ENABLE_PAIRING_BONDING
int
mp_bluetooth_gap_pair
(
uint16_t
conn_handle
)
{
DEBUG_printf
(
"mp_bluetooth_gap_pair: conn_handle=%d
\n
"
,
conn_handle
);
sm_request_pairing
(
conn_handle
);
return
0
;
}
int
mp_bluetooth_gap_passkey
(
uint16_t
conn_handle
,
uint8_t
action
,
mp_int_t
passkey
)
{
DEBUG_printf
(
"mp_bluetooth_gap_passkey: conn_handle=%d action=%d passkey=%d
\n
"
,
conn_handle
,
action
,
(
int
)
passkey
);
return
MP_EOPNOTSUPP
;
}
#endif // MICROPY_PY_BLUETOOTH_ENABLE_PAIRING_BONDING
#if MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE
...
...
@@ -1341,4 +1348,33 @@ int mp_bluetooth_gattc_exchange_mtu(uint16_t conn_handle) {
}
#endif // MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE
#if MICROPY_PY_BLUETOOTH_ENABLE_L2CAP_CHANNELS
int
mp_bluetooth_l2cap_listen
(
uint16_t
psm
,
uint16_t
mtu
)
{
DEBUG_printf
(
"mp_bluetooth_l2cap_listen: psm=%d, mtu=%d
\n
"
,
psm
,
mtu
);
return
MP_EOPNOTSUPP
;
}
int
mp_bluetooth_l2cap_connect
(
uint16_t
conn_handle
,
uint16_t
psm
,
uint16_t
mtu
)
{
DEBUG_printf
(
"mp_bluetooth_l2cap_connect: conn_handle=%d, psm=%d, mtu=%d
\n
"
,
conn_handle
,
psm
,
mtu
);
return
MP_EOPNOTSUPP
;
}
int
mp_bluetooth_l2cap_disconnect
(
uint16_t
conn_handle
,
uint16_t
cid
)
{
DEBUG_printf
(
"mp_bluetooth_l2cap_disconnect: conn_handle=%d, cid=%d
\n
"
,
conn_handle
,
cid
);
return
MP_EOPNOTSUPP
;
}
int
mp_bluetooth_l2cap_send
(
uint16_t
conn_handle
,
uint16_t
cid
,
const
uint8_t
*
buf
,
size_t
len
,
bool
*
stalled
)
{
DEBUG_printf
(
"mp_bluetooth_l2cap_send: conn_handle=%d, cid=%d, len=%d
\n
"
,
conn_handle
,
cid
,
(
int
)
len
);
return
MP_EOPNOTSUPP
;
}
int
mp_bluetooth_l2cap_recvinto
(
uint16_t
conn_handle
,
uint16_t
cid
,
uint8_t
*
buf
,
size_t
*
len
)
{
DEBUG_printf
(
"mp_bluetooth_l2cap_recvinto: conn_handle=%d, cid=%d, len=%d
\n
"
,
conn_handle
,
cid
,
(
int
)
*
len
);
return
MP_EOPNOTSUPP
;
}
#endif // MICROPY_PY_BLUETOOTH_ENABLE_L2CAP_CHANNELS
#endif // MICROPY_PY_BLUETOOTH && MICROPY_BLUETOOTH_BTSTACK
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