1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_INCLUDE_USBD_MSG_H 8 #define ZEPHYR_INCLUDE_USBD_MSG_H 9 10 #include <zephyr/usb/usbd.h> 11 12 /** 13 * @brief Publish simple USB device message 14 * 15 * @param[in] uds_ctx Pointer to a device context 16 * @param[in] type Message type 17 * @param[in] status Status or error code 18 */ 19 void usbd_msg_pub_simple(struct usbd_context *const ctx, 20 const enum usbd_msg_type type, const int status); 21 22 /** 23 * @brief Publish USB device message with pointer to a device payload 24 * 25 * @param[in] uds_ctx Pointer to a device context 26 * @param[in] type Message type 27 * @param[in] dev Pointer to a device structure 28 */ 29 void usbd_msg_pub_device(struct usbd_context *const ctx, 30 const enum usbd_msg_type type, const struct device *const dev); 31 32 #endif /* ZEPHYR_INCLUDE_USBD_MSG_H */ 33