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.
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.
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.
In test_case_2x_callbacks two tickers are setup to repeatedly
reschedule each other. When these tickers are deleted this
rescheduling is still occurring and can lead to a deleted ticker
being scheduled.
When this happens the following error message is displayed:
Thread 0x0 error -6: Not allowed in ISR context
Note - this problem was not detected by CI since the test reported
the correct results back to the host test and only experienced this
error on tear down.
This problem can be reproduced on an nrf51 by first building the ticker
test with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker
--compile -DMBED_TRAP_ERRORS_ENABLED=1
-DMBED_HEAP_STATS_ENABLED=1 -DMBED_STACK_STATS_ENABLED=1"
And then running testing with:
"mbed test -t GCC_ARM -m NRF51_DK -n tests-mbed_drivers-ticker --run"
This commit reverts commit c1c0f1ea57
because it causes nightly builds to fail. This is because extra tests
added in tests-mbed_drivers-ticker fail on some targets, such as the
KL46Z, MAX32625MBED, MAX32630FTHR, NCS36510, NRF51 and NRF52_DK.
If a LowPowerTimer is started and then goes out of scope then a
deep sleep lock underflow can occur. This is because the
the variable '_lock_deepsleep' is checked when starting the timer
but is not checked in the destructor, which unconditionally releases
the deep sleep lock.
Add _lock_count to DeepSleepLock and use this to prevent deep sleep
from staying locked when the DeepSleepLock objected is destroyed after
an unbalanced number of calls to lock and unlock.