usb: dfu: give wait_for_usb_dfu an argument

Allow callers to wait for an arbitrary amount of time, instead of always
waiting for a compile-time fixed period.

Signed-off-by: Josh Gao <josh@jmgao.dev>
This commit is contained in:
Josh Gao 2020-11-13 18:49:30 -08:00 committed by Carles Cufí
commit 16d2ab790c
4 changed files with 10 additions and 17 deletions

View file

@ -44,6 +44,8 @@
#ifndef ZEPHYR_INCLUDE_USB_CLASS_USB_DFU_H_
#define ZEPHYR_INCLUDE_USB_CLASS_USB_DFU_H_
#include <sys_clock.h>
/** DFU Class Subclass */
#define DFU_SUBCLASS 0x01
@ -121,6 +123,6 @@ enum dfu_state {
dfuERROR,
};
void wait_for_usb_dfu(void);
void wait_for_usb_dfu(k_timeout_t delay);
#endif /* ZEPHYR_INCLUDE_USB_CLASS_USB_DFU_H_ */