samples/subsys/usb/webusb/src/webusb_serial.c
static void webusb_serial_dev_status_cb(enum usb_dc_status_code status)
{
	struct webusb_serial_dev_data_t * const dev_data =
	    DEV_DATA(webusb_serial_dev);

	/* Store the new status */
	dev_data->usb_status = status;

	/* Check the USB status and do needed action if required */
	switch (status) {
	case USB_DC_ERROR:
		SYS_LOG_DBG("USB device error");
		break;
	case USB_DC_RESET:
		SYS_LOG_DBG("USB device reset detected");
		break;
	case USB_DC_CONNECTED:
		SYS_LOG_DBG("USB device connected");
		break;
	case USB_DC_CONFIGURED:
		SYS_LOG_DBG("USB device configured");
		break;
	case USB_DC_DISCONNECTED:
		SYS_LOG_DBG("USB device disconnected");
		break;
	case USB_DC_SUSPEND:
		SYS_LOG_DBG("USB device supended");
		break;
	case USB_DC_RESUME:
		SYS_LOG_DBG("USB device resumed");
		break;
	case USB_DC_UNKNOWN:
	default:
		SYS_LOG_DBG("USB unknown state");
		break;
	}
}
/**
 * @brief Callback used to know the USB connection status
 *
 * @param status USB device status code.
 *
 * @return  N/A.
 */
@brief Callback used to know the USB connection status
@param status USB device status code.

@return  N/A.
@brief Callback used to know the USB connection status @param status USB device status code . @return N / A .
static void webusb_serial_dev_status_cb(enum usb_dc_status_code status)
{
	struct webusb_serial_dev_data_t * const dev_data =
	    DEV_DATA(webusb_serial_dev);
	dev_data->usb_status = status;
	switch (status) {
	case USB_DC_ERROR:
		SYS_LOG_DBG("USB device error");
		break;
	case USB_DC_RESET:
		SYS_LOG_DBG("USB device reset detected");
		break;
	case USB_DC_CONNECTED:
		SYS_LOG_DBG("USB device connected");
		break;
	case USB_DC_CONFIGURED:
		SYS_LOG_DBG("USB device configured");
		break;
	case USB_DC_DISCONNECTED:
		SYS_LOG_DBG("USB device disconnected");
		break;
	case USB_DC_SUSPEND:
		SYS_LOG_DBG("USB device supended");
		break;
	case USB_DC_RESUME:
		SYS_LOG_DBG("USB device resumed");
		break;
	case USB_DC_UNKNOWN:
	default:
		SYS_LOG_DBG("USB unknown state");
		break;
	}
}
static void webusb_serial_dev_status_cb ( enum usb_dc_status_code status ) { struct webusb_serial_dev_data_t * const dev_data = DEV_DATA ( webusb_serial_dev ) ; dev_data -> usb_status = status ; switch ( status ) { case USB_DC_ERROR : SYS_LOG_DBG ( " " ) ; break ; case USB_DC_RESET : SYS_LOG_DBG ( " " ) ; break ; case USB_DC_CONNECTED : SYS_LOG_DBG ( " " ) ; break ; case USB_DC_CONFIGURED : SYS_LOG_DBG ( " " ) ; break ; case USB_DC_DISCONNECTED : SYS_LOG_DBG ( " " ) ; break ; case USB_DC_SUSPEND : SYS_LOG_DBG ( " " ) ; break ; case USB_DC_RESUME : SYS_LOG_DBG ( " " ) ; break ; case USB_DC_UNKNOWN : default : SYS_LOG_DBG ( " " ) ; break ; } }
@brief Callback used to know the USB connection status
 @param status USB device status code.
@brief Callback used to know the USB connection status @param status USB device status code .
/* Store the new status */ /* Check the USB status and do needed action if required */