-
Notifications
You must be signed in to change notification settings - Fork 3k
Cordio: Pal Gap implementation #5313
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
Conversation
@marcbonnici @0xc0170 @scartmell-arm Could you review this PR ? |
@AnotherButler FYI huge bit of new docs in this PR. |
features/FEATURE_BLE/ble/SafeEnum.h
Outdated
* @return true if the inner value of lhs and rhs are not equal and false | ||
* otherwise. | ||
*/ | ||
friend bool operator!=(SafeEnum lhs, SafeEnum rhs) { |
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.
The comparison operators could be implemented in terms of each other so only ==
and <
need to be maintained if anything changes.
friend bool operator!=(SafeEnum lhs, SafeEnum rhs) {
return !(operator==(lhs, rhs));
}
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.
Agreed however it is not necessary to use the prefix notation to invoke the equal operator, the infix notation is fine (lhs == rhs
).
788c67f
to
e8e23e8
Compare
@AnotherButler APIs in this PR are no meant to be publicly used. They are supposed to be used by partners which implement mbed BLE. It would be a good thing to have the documentation of these APIs in a porting guide of the BLE platform abstraction layer however it would be terrible and counter productive to have references to these APIs in the documentation of the public API. |
This interface expose the primitives needed to realize operations defined in the GAP layer. Data types, event and function definitions follow closely HCI commands and events defined in the Bluetooth specification.
Add an abstraction which manage the state of the GAP service exposed by the GATT server.
This filter prevent events to be signaled multiple times to the upper layer. It also signal events to a newly set event processor hook.
To help generic code, an interface of an event queue at the PAL level has been added. Implementation can either rely on the event mechanism internal to the stack or use the SimpleEventQueue implementation provided by this patch.
Generic implementation of the GAP class. It allows porters to have a working Gap implementation by implementing the following abstraction layer primitives: - pal::Gap: Adaptation for GAP related primitives. - pal::EventQueue: simple interface to the inner event queue of the stack. pal::SimpleEventQueue can also be used as an implementation. - pal::GenericAccessService: Accessors to the Generic Access Service present in the GATT server.
e8e23e8
to
c8747aa
Compare
/morph build |
Build : SUCCESSBuild number : 410 Triggering tests/morph test |
Test : SUCCESSBuild number : 201 |
Build : SUCCESSBuild number : 471 Triggering tests/morph test |
Test : SUCCESSBuild number : 290 |
@0xc0170 Any update on this ? |
/morph build |
Build : SUCCESSBuild number : 818 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 469 |
Test : SUCCESSBuild number : 658 |
Description
This PR replace the existing specific Gap implementation by the generic Gap implementation. The following pal implementations has been added for
pal::Gap
andpal::GenericAccessService
.The Gatt server function
write
andareUpdateEnabled
has also been fixed, they where relying on the default gatt connection handle which is plainly incorrect in a multiple client context.Status
READY
Migrations
NO
Related PRs
#5311
Note
Diff can be found here: https://github.com/pan-/mbed/compare/ble-generic-gap..pan-:ble-cordio-pal-gap