Skip to content

Commit 4dcb363

Browse files
committed
pbio/test/sys: Enable Bluetooth in test.
The pbio/sys/bluetooth will no longer exist but we still want to keep this test to later modify accordingly.
1 parent bdf60f7 commit 4dcb363

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/pbio/test/sys/test_bluetooth.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#include <tinytest_macros.h>
1010
#include <tinytest.h>
1111

12+
#include <pbdrv/bluetooth.h>
13+
1214
#include <pbio/util.h>
1315
#include <pbsys/host.h>
1416
#include <pbsys/main.h>
@@ -26,12 +28,16 @@ static PT_THREAD(test_bluetooth(struct pt *pt)) {
2628
// power should be initialized to off
2729
tt_want_uint_op(pbio_test_bluetooth_get_control_state(), ==, PBIO_TEST_BLUETOOTH_STATE_OFF);
2830

31+
pbdrv_bluetooth_power_on(true);
32+
2933
// wait for the power on delay
3034
PT_WAIT_UNTIL(pt, ({
3135
pbio_test_clock_tick(1);
3236
pbio_test_bluetooth_get_control_state() == PBIO_TEST_BLUETOOTH_STATE_ON;
3337
}));
3438

39+
pbdrv_bluetooth_start_advertising();
40+
3541
PT_WAIT_UNTIL(pt, ({
3642
pbio_test_clock_tick(1);
3743
pbio_test_bluetooth_is_advertising_enabled();

0 commit comments

Comments
 (0)