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:
parent
6525975a0e
commit
16d2ab790c
4 changed files with 10 additions and 17 deletions
|
@ -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_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue