Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: microbit_rubber_ducky microbit_mouse_BLE microbit_mouse_BLE_daybreak_version microbit_presenter
Fork of nRF51822 by
Diff: btle/btle_gap.cpp
- Revision:
- 165:67fcad70785a
- Parent:
- 103:138bdc859cc9
- Child:
- 176:03a9fc49c21e
diff -r 8bb2633e7976 -r 67fcad70785a btle/btle_gap.cpp
--- a/btle/btle_gap.cpp	Wed May 13 08:49:34 2015 +0100
+++ b/btle/btle_gap.cpp	Wed May 13 08:49:34 2015 +0100
@@ -96,4 +96,20 @@
 {
     ASSERT_STATUS_RET_VOID( nrf_error );
 }
-#endif // SDK_CONN_PARAMS_MODULE_ENABLE
\ No newline at end of file
+#endif // SDK_CONN_PARAMS_MODULE_ENABLE
+
+
+void
+btle_gapStartScanning(void)
+{
+    ble_gap_scan_params_t scanParams = {
+        .active      = 0,        /**< If 1, perform active scanning (scan requests). */
+        .selective   = 0,        /**< If 1, ignore unknown devices (non whitelisted). */
+        .p_whitelist = NULL,     /**< Pointer to whitelist, NULL if none is given. */
+        .interval    = 1000,     /**< Scan interval between 0x0004 and 0x4000 in 0.625ms units (2.5ms to 10.24s). */
+        .window      = 500,      /**< Scan window between 0x0004 and 0x4000 in 0.625ms units (2.5ms to 10.24s). */
+        .timeout     = 0,        /**< Scan timeout between 0x0001 and 0xFFFF in seconds, 0x0000 disables timeout. */
+    };
+
+    sd_ble_gap_scan_start(&scanParams);
+}
\ No newline at end of file
    