Lancaster University's fork of the mbed BLE API. Lives on github, https://github.com/lancaster-university/BLE_API
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Diff: ble/GapScanningParams.h
- Revision:
- 766:03f1a26f132f
- Parent:
- 710:b2e1a2660ec2
- Child:
- 900:1e6785897fbd
--- a/ble/GapScanningParams.h Fri Aug 07 15:53:50 2015 +0100 +++ b/ble/GapScanningParams.h Fri Aug 07 15:53:50 2015 +0100 @@ -32,6 +32,11 @@ uint16_t timeout = 0, bool activeScanning = false); + static const uint16_t UNIT_0_625_MS = 625; /**< Number of microseconds in 0.625 milliseconds. */ + static uint16_t MSEC_TO_SCAN_DURATION_UNITS(uint32_t durationInMillis) { + return (durationInMillis * 1000) / UNIT_0_625_MS; + } + ble_error_t setInterval(uint16_t newIntervalInMS); ble_error_t setWindow(uint16_t newWindowInMS);