Commit 43f3c50
committed
samples: ble_nus_central: cleanup sample
* Update header include list. Add missing and reorder.
* Update return type of scan_start function to void because the
returned error values are not used.
* Align the placement of const keyword for some parameters and
variables.
* Align names some event handlers and init functions.
* Align setup of scan filters with other central samples.
* Removed call to ble_nus_client_handles_assign from
BLE_GAP_EVT_CONNECTED evt handling (it is done from
BLE_NUS_CLIENT_EVT_DISCOVERY_COMPLETE event handling) and
moved a call to scan_start() from BLE_NUS_CLIENT_EVT_DISCONNECTED
event handling to BLE_GAP_EVT_DISCONNECTED event handling to align
with ble_hrs_central sample.
* Removed application specific handling of the
BLE_GAP_EVT_PHY_UPDATE_REQUEST event. It is now handled by
the conn_params library.
* Removed some duplicate logging of ATT MTU and data length updates.
Signed-off-by: Andreas Moltumyr <andreas.moltumyr@nordicsemi.no>1 parent 9d7760b commit 43f3c50
3 files changed
Lines changed: 133 additions & 160 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | | - | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
0 commit comments