diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-12-07 09:42:57 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-12-07 11:08:31 +0100 |
commit | e1552e24d0bb4dfdc29e9d1238a6d87c68638ea3 (patch) | |
tree | 9f75ed7bc46be34ac226bcc1e7657b1bfa363297 /include | |
parent | 0b5361a328632e64c14a54306119093a0c7fecdf (diff) | |
download | barebox-e1552e24d0bb4dfdc29e9d1238a6d87c68638ea3.tar.gz barebox-e1552e24d0bb4dfdc29e9d1238a6d87c68638ea3.tar.xz |
usb: gadget: fastboot: pass message type as enum
We used to pass the message type ("INFO", "FAIL", "OKAY") as strings
to fastboot_tx_print(). Change this to a enum type. This allows
fastboot_tx_print() to react on the message type in the next step.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/usb/fastboot.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/usb/fastboot.h b/include/usb/fastboot.h index 00c9d00df5..c0775c67dd 100644 --- a/include/usb/fastboot.h +++ b/include/usb/fastboot.h @@ -32,6 +32,14 @@ struct f_fastboot_opts { */ #define FASTBOOT_CMD_FALLTHROUGH 1 -int fastboot_tx_print(struct f_fastboot *f_fb, const char *fmt, ...); +enum fastboot_msg_type { + FASTBOOT_MSG_OKAY, + FASTBOOT_MSG_FAIL, + FASTBOOT_MSG_INFO, + FASTBOOT_MSG_DATA, +}; + +int fastboot_tx_print(struct f_fastboot *f_fb, enum fastboot_msg_type type, + const char *fmt, ...); #endif /* _USB_FASTBOOT_H */ |