Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated functionality in GapAdvertisingParams and GapScanningParams #166

Open
andresag01 opened this issue Jan 14, 2016 · 1 comment
Open

Comments

@andresag01
Copy link

GapAdvertisingParams and GapScanningParams use MSEC_TO_ADVERTISEMENT_DURATION_UNITS() and MSEC_TO_SCAN_DURATION_UNITS() respectively to convert from milliseconds to units of 0.625. However, these two functions do exactly the same operation:

return (durationInMillis * 1000) / UNIT_0_625_MS;

Therefore, this functionality is duplicated. Perhaps it should be included in a common location such as blecommon.h or BLEProtocol? These conversions are necessary because those are the units that the BLE specification uses, they are not specific to advertising or scanning params.

NOTE: The same goes for UNIT_0_625_MS in here and here.

@ciarmcom
Copy link
Member

ARM Internal Ref: IOTSFW-1809

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants