-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Bluetooth: services: Move GATT services source files #17355
Conversation
In general I'm happy for the direction this is taking, however one thing to be aware of is that you're now introducing these as official public APIs. I think it might make sense to flag them as experimental for now, so we can spend some time seeing if they need any fine-tuning or not. |
This commit moves the BLE GATT Battery service from /samples/bluetooth/gatt to /subsys/bluetooth/services and adds a Kconfig entry to enable and configure the service; when enabled, it will register itself automatically. Signed-off-by: Emanuele Di Santo <emdi@nordicsemi.no> Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit moves the BLE GATT heart rate service from samples/bluetooth/gatt to subsys/bluetooth/services and adds a Kconfig entry to enable and configure the service. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move the health thermometer service into the sample folder that demonstrates it. This avoids long build paths Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move the Current Time service into the sample that demonstrates it. This avoids long build paths Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Move the HID over GATT service into the sample that demonstrates it. This avoids long build paths Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Delete IPSP sample file, this source file is not included in any build files. The service contains no valuable logic other than advertising with the IPSP service in the advertising data. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
@jhedberg Good point. Which is also why I didn't move all of them, only the ones that was being re-used. I have marked BAS and HRS as Experimental (Hopefully that is the correct way to do it, I wasn't really sure). |
|
||
menuconfig BT_GATT_BAS | ||
bool "Enable GATT Battery service" | ||
select SENSOR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is no longer needed.
|
||
if BT_GATT_BAS | ||
|
||
config BT_GATT_BAS_LOG_LEVEL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the Kconfig template for this now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps then it'd be a good idea to give the user the option to not run bas_init
during SYS_INIT
, and make that API public?
There is nothing happening in bas_init now. The service is registered as a static service. |
Right, so my question is whether we want to make the |
@lemrey I don't think that is necessary. And later if I'm wrong it should be no trouble to add it :) |
Move the GATT services source files. Components that are re-used are moved into the bluetooth subsystem and Kconfig options are added to include them in the build.
Services that are only used once are moved into the sample that includes it.
The IPSP service was not in use so it was removed.