Skip to content

Commit 821f401

Browse files
committed
pbio/platform/virtualhub: Use USB mock for CI stdout.
We will use the mock Bluetooth driver for local development, but the CI tests won't need this.
1 parent 35f1457 commit 821f401

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

lib/pbio/platform/virtual_hub/pbdrvconfig.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
#define PBDRV_CONFIG_BLOCK_DEVICE_RAM_SIZE (50 * 1024)
99
#define PBDRV_CONFIG_BLOCK_DEVICE_TEST (1)
1010

11+
// Use Bluetooth simulation locally.
12+
#ifndef PBDRV_CONFIG_RUN_ON_CI
1113
#define PBDRV_CONFIG_BLUETOOTH (1)
1214
#define PBDRV_CONFIG_BLUETOOTH_SIMULATION (1)
15+
#endif // PBDRV_CONFIG_RUN_ON_CI
1316

1417
#define PBDRV_CONFIG_BUTTON (1)
1518
#define PBDRV_CONFIG_BUTTON_TEST (1)
@@ -46,9 +49,12 @@
4649
#define PBDRV_CONFIG_HAS_PORT_F (1)
4750
#define PBDRV_CONFIG_HAS_PORT_VCC_CONTROL (1)
4851

49-
#define PBDRV_CONFIG_USB (0)
52+
// USB mock driver used on CI.
53+
#ifdef PBDRV_CONFIG_RUN_ON_CI
54+
#define PBDRV_CONFIG_USB (1)
55+
#define PBDRV_CONFIG_USB_SIMULATION (1)
5056
#define PBDRV_CONFIG_USB_MAX_PACKET_SIZE (64)
5157
#define PBDRV_CONFIG_USB_NUM_BUFFERED_PACKETS (2)
52-
#define PBDRV_CONFIG_USB_SIMULATION (0)
5358
#define PBDRV_CONFIG_USB_MFG_STR u"Pybricks"
5459
#define PBDRV_CONFIG_USB_PROD_STR u"Virtual Hub"
60+
#endif // PBDRV_CONFIG_RUN_ON_CI

0 commit comments

Comments
 (0)