Skip to content

Commit 0075791

Browse files
maxd-nordicrlubos
authored andcommitted
connectivity_bridge: USB BULK fix state
This patch fixes the state handling of the USB BULK interface module. Modules in this setup cannot go into "standby" if they weren't "ready" before. Signed-off-by: Maximilian Deubel <[email protected]>
1 parent 85a14ec commit 0075791

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

applications/connectivity_bridge/src/modules/usb_bulk_interface.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,15 @@ static bool app_event_handler(const struct app_event_header *aeh)
205205
const struct module_state_event *event = cast_module_state_event(aeh);
206206

207207
if (check_state(event, MODULE_ID(main), MODULE_STATE_READY)) {
208+
/* tell the rest of the system that we are busy. */
209+
module_set_state(MODULE_STATE_READY);
210+
208211
/* Add MS OS 2.0 BOS descriptor to BOS structure */
209212
usb_bos_register_cap((void *)&bos_cap_msosv2);
210213
/* Point interface index to string descriptor */
211214
iface_string_desc_init(&dapusb_config);
212215

213-
/* tell the usb_cdc_handler we are done */
216+
/* tell the usb_cdc_handler we are done. */
214217
module_set_state(MODULE_STATE_STANDBY);
215218
}
216219
return false;

0 commit comments

Comments
 (0)