1/** 2 * \brief this file contains the USB error codes 3 */ 4/* 5 * Copyright (c) 2007-2013 ETH Zurich. 6 * All rights reserved. 7 * 8 * This file is distributed under the terms in the attached LICENSE file. 9 * If you do not find this file, copies can be found by writing to: 10 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 11 */ 12 13#ifndef _USB_ERROR_H_ 14#define _USB_ERROR_H_ 15 16 17typedef enum { 18 USB_ERR_OK = 0, 19 USB_ERR_PENDING_REQUESTS, /* 1 */ 20 USB_ERR_NOT_STARTED, /* 2 */ 21 USB_ERR_INVAL, /* 3 */ 22 USB_ERR_NOMEM, /* 4 */ 23 USB_ERR_CANCELLED, /* 5 */ 24 USB_ERR_BAD_ADDRESS, /* 6 */ 25 USB_ERR_BAD_BUFSIZE, /* 7 */ 26 USB_ERR_BAD_FLAG, /* 8 */ 27 USB_ERR_NO_CALLBACK, /* 9 */ 28 USB_ERR_IN_USE, /* 10 */ 29 USB_ERR_NO_ADDR, /* 11 */ 30 USB_ERR_NO_PIPE, /* 12 */ 31 USB_ERR_ZERO_NFRAMES, /* 13 */ 32 USB_ERR_ZERO_MAXP, /* 14 */ 33 USB_ERR_SET_ADDR_FAILED, /* 15 */ 34 USB_ERR_NO_POWER, /* 16 */ 35 USB_ERR_TOO_DEEP, /* 17 */ 36 USB_ERR_IOERROR, /* 18 */ 37 USB_ERR_NOT_CONFIGURED, /* 19 */ 38 USB_ERR_TIMEOUT, /* 20 */ 39 USB_ERR_SHORT_XFER, /* 21 */ 40 USB_ERR_STALLED, /* 22 */ 41 USB_ERR_INTERRUPTED, /* 23 */ 42 USB_ERR_DMA_LOAD_FAILED, /* 24 */ 43 USB_ERR_BAD_CONTEXT, /* 25 */ 44 USB_ERR_NO_ROOT_HUB, /* 26 */ 45 USB_ERR_NO_INTR_THREAD, /* 27 */ 46 USB_ERR_NOT_LOCKED, /* 28 */ 47 USB_ERR_BAD_REQUEST, /* 29 */ 48 USB_ERR_IDC, /* 30 */ 49 USB_ERR_MAX 50} usb_error_t; 51 52 53const char* usb_get_error_string(usb_error_t errno); 54 55#endif 56