Skip to content

Commit 4f8a006

Browse files
committed
Cordio BLE: Document in test what fields are expected to be set after init.
1 parent 5b7f7aa commit 4f8a006

File tree

1 file changed

+13
-0
lines changed
  • features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/driver

1 file changed

+13
-0
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/driver/main.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,25 @@ static void test_stack_initialization() {
7070
// At this point ble is suppose to be initialized; inspect the various state
7171
// of the stack.
7272
TEST_ASSERT_EQUAL(INITIALIZATION_SUCCESS, initialization_state);
73+
74+
// ensure that the size of ACL buffer of the controller has been filled in
75+
// during the initialisation
7376
TEST_ASSERT_NOT_EQUAL(0, hciCoreCb.bufSize);
77+
78+
// Ensure that the total number of buffer available in the controller has
79+
// been filled in during the initialisation
7480
TEST_ASSERT_NOT_EQUAL(0, hciCoreCb.numBufs);
81+
82+
// Ensure that at least one HCI buffer is available
7583
TEST_ASSERT_NOT_EQUAL(0, hciCoreCb.availBufs);
7684

85+
// Ensure that allowed LE state has been filled in during initialisation
86+
// Note: see BT command LE Read Supported States Command in BT specification
7787
uint8_t invalid_le_states[HCI_LE_STATES_LEN] = { 0 };
7888
TEST_ASSERT_NOT_EQUAL(0, memcmp(invalid_le_states, hciCoreCb.leStates, HCI_LE_STATES_LEN));
89+
90+
// Ensure that the size of the whitelist of the controller has been filled
91+
// in during the initialisation
7992
TEST_ASSERT_NOT_EQUAL(0, hciCoreCb.whiteListSize);
8093

8194
// Note: cannot test supported features are the list may be null

0 commit comments

Comments
 (0)