summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDario Nieuwenhuis <dirbaio@dirbaio.net>2020-12-04 03:32:11 +0100
committerDario Nieuwenhuis <dirbaio@dirbaio.net>2020-12-04 03:34:18 +0100
commitec66eafb4085194f9a820a26222c5074f72ecf11 (patch)
tree13c95b3a41d671ee43b0d314380db40b1d16eece /examples
parentaf8a6b1cfa5d952f283ec29272aba4dfcc275d9c (diff)
downloadnrf-softdevice-ec66eafb4085194f9a820a26222c5074f72ecf11.zip
l2cap: allow setting rx flow control credits
Diffstat (limited to 'examples')
-rw-r--r--examples/src/bin/ble_bas_peripheral.rs2
-rw-r--r--examples/src/bin/ble_l2cap_central.rs6
-rw-r--r--examples/src/bin/ble_l2cap_peripheral.rs6
3 files changed, 11 insertions, 3 deletions
diff --git a/examples/src/bin/ble_bas_peripheral.rs b/examples/src/bin/ble_bas_peripheral.rs
index a33b5b3..53b4e34 100644
--- a/examples/src/bin/ble_bas_peripheral.rs
+++ b/examples/src/bin/ble_bas_peripheral.rs
@@ -52,7 +52,7 @@ async fn bluetooth_task(sd: &'static Softdevice, config: peripheral::Config) {
adv_data,
scan_data,
};
- let conn = unwrap!(peripheral::advertise(sd, adv, &config,).await);
+ let conn = unwrap!(peripheral::advertise(sd, adv, &config).await);
info!("advertising done!");
diff --git a/examples/src/bin/ble_l2cap_central.rs b/examples/src/bin/ble_l2cap_central.rs
index 3e04aa7..24e5565 100644
--- a/examples/src/bin/ble_l2cap_central.rs
+++ b/examples/src/bin/ble_l2cap_central.rs
@@ -74,7 +74,11 @@ async fn ble_central_task(sd: &'static Softdevice) {
info!("connected");
let l = l2cap::L2cap::<Packet>::init(sd);
- let ch = unwrap!(l.setup(&conn, PSM).await);
+ let config = l2cap::Config {
+ psm: PSM,
+ credits: 8,
+ };
+ let ch = unwrap!(l.setup(&conn, &config).await);
info!("l2cap connected");
for i in 0..10 {
diff --git a/examples/src/bin/ble_l2cap_peripheral.rs b/examples/src/bin/ble_l2cap_peripheral.rs
index 3921864..bc20437 100644
--- a/examples/src/bin/ble_l2cap_peripheral.rs
+++ b/examples/src/bin/ble_l2cap_peripheral.rs
@@ -54,7 +54,11 @@ async fn bluetooth_task(sd: &'static Softdevice, config: peripheral::Config) {
info!("advertising done!");
- let ch = unwrap!(l.listen(&conn, PSM).await);
+ let config = l2cap::Config {
+ psm: PSM,
+ credits: 8,
+ };
+ let ch = unwrap!(l.listen(&conn, &config).await);
info!("l2cap connected");
loop {