summaryrefslogtreecommitdiff
path: root/examples/src/bin/ble_l2cap_peripheral.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2021-10-18 17:51:37 +0200
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2021-10-18 17:51:37 +0200
commit8a7ae35733156e903a6c9ddc8dc3c0b7dfada59c (patch)
treeaaed7ef2725010348d3b0d52f4097479a7fc0353 /examples/src/bin/ble_l2cap_peripheral.rs
parentb087b61f095a6a383956130a7e95e1d85ae11486 (diff)
downloadnrf-softdevice-8a7ae35733156e903a6c9ddc8dc3c0b7dfada59c.zip
ble/l2cap: add listen_with, to allow listening on multiple PSMs at once.
Diffstat (limited to 'examples/src/bin/ble_l2cap_peripheral.rs')
-rw-r--r--examples/src/bin/ble_l2cap_peripheral.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/src/bin/ble_l2cap_peripheral.rs b/examples/src/bin/ble_l2cap_peripheral.rs
index ecda5f4..eccd555 100644
--- a/examples/src/bin/ble_l2cap_peripheral.rs
+++ b/examples/src/bin/ble_l2cap_peripheral.rs
@@ -53,11 +53,8 @@ async fn bluetooth_task(sd: &'static Softdevice) {
info!("advertising done!");
- let config = l2cap::Config {
- psm: PSM,
- credits: 8,
- };
- let ch = unwrap!(l.listen(&conn, &config).await);
+ let config = l2cap::Config { credits: 8 };
+ let ch = unwrap!(l.listen(&conn, &config, PSM).await);
info!("l2cap connected");
loop {