summaryrefslogtreecommitdiff
path: root/tinyusb/common/std_request.h
diff options
context:
space:
mode:
authorhathach <[email protected]>2014-03-12 14:43:58 +0700
committerhathach <[email protected]>2014-03-12 14:43:58 +0700
commit0f0d9d127b9f529b42f6a56fb5282f2bc993c3bb (patch)
treebb9d915be0ad68a9c6c081248c9d570dd517ce20 /tinyusb/common/std_request.h
parentb6e4c0d34897a574b2f49074bb57dc91584da77c (diff)
able to build lpc11u with IAR
clean ending warming with IAR
Diffstat (limited to 'tinyusb/common/std_request.h')
-rw-r--r--tinyusb/common/std_request.h168
1 files changed, 84 insertions, 84 deletions
diff --git a/tinyusb/common/std_request.h b/tinyusb/common/std_request.h
index 240587691..dd48b737c 100644
--- a/tinyusb/common/std_request.h
+++ b/tinyusb/common/std_request.h
@@ -1,84 +1,84 @@
-/**************************************************************************/
-/*!
- @file std_request.h
- @author hathach (tinyusb.org)
-
- @section LICENSE
-
- Software License Agreement (BSD License)
-
- Copyright (c) 2013, hathach (tinyusb.org)
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. Neither the name of the copyright holders nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This file is part of the tinyusb stack.
-*/
-/**************************************************************************/
-
-/** \ingroup TBD
- * \defgroup TBD
- * \brief TBD
- *
- * @{
- */
-
-#ifndef _TUSB_STD_REQUEST_H_
-#define _TUSB_STD_REQUEST_H_
-
-#ifdef __cplusplus
- extern "C" {
-#endif
-
-typedef ATTR_PACKED_STRUCT(struct){
- union {
- ATTR_PACKED_STRUCT(struct) {
- uint8_t recipient : 5; /**< Recipient type tusb_std_request_recipient_t. */
- uint8_t type : 2; /**< Request type tusb_control_request_type_t. */
- uint8_t direction : 1; /**< Direction type. tusb_direction_t */
- } bmRequestType_bit;
- uint8_t bmRequestType;
- };
-
- uint8_t bRequest;
- uint16_t wValue;
- uint16_t wIndex;
- uint16_t wLength;
-} tusb_control_request_t;
-
-STATIC_ASSERT( sizeof(tusb_control_request_t) == 8, "mostly compiler option issue");
-
-// TODO move to somewhere suitable
-static inline uint8_t bm_request_type(uint8_t direction, uint8_t type, uint8_t recipient) ATTR_CONST ATTR_ALWAYS_INLINE;
-static inline uint8_t bm_request_type(uint8_t direction, uint8_t type, uint8_t recipient)
-{
- return ((uint8_t) (direction << 7)) | ((uint8_t) (type << 5)) | (recipient);
-}
-
-#ifdef __cplusplus
- }
-#endif
-
-#endif /* _TUSB_STD_REQUEST_H_ */
-
-/** @} */
+/**************************************************************************/
+/*!
+ @file std_request.h
+ @author hathach (tinyusb.org)
+
+ @section LICENSE
+
+ Software License Agreement (BSD License)
+
+ Copyright (c) 2013, hathach (tinyusb.org)
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the copyright holders nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ This file is part of the tinyusb stack.
+*/
+/**************************************************************************/
+
+/** \ingroup TBD
+ * \defgroup TBD
+ * \brief TBD
+ *
+ * @{
+ */
+
+#ifndef _TUSB_STD_REQUEST_H_
+#define _TUSB_STD_REQUEST_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+typedef ATTR_PACKED_STRUCT(struct){
+ union {
+ ATTR_PACKED_STRUCT(struct) {
+ uint8_t recipient : 5; /**< Recipient type tusb_std_request_recipient_t. */
+ uint8_t type : 2; /**< Request type tusb_control_request_type_t. */
+ uint8_t direction : 1; /**< Direction type. tusb_direction_t */
+ } bmRequestType_bit;
+ uint8_t bmRequestType;
+ };
+
+ uint8_t bRequest;
+ uint16_t wValue;
+ uint16_t wIndex;
+ uint16_t wLength;
+} tusb_control_request_t;
+
+STATIC_ASSERT( sizeof(tusb_control_request_t) == 8, "mostly compiler option issue");
+
+// TODO move to somewhere suitable
+static inline uint8_t bm_request_type(uint8_t direction, uint8_t type, uint8_t recipient) ATTR_CONST ATTR_ALWAYS_INLINE;
+static inline uint8_t bm_request_type(uint8_t direction, uint8_t type, uint8_t recipient)
+{
+ return ((uint8_t) (direction << 7)) | ((uint8_t) (type << 5)) | (recipient);
+}
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* _TUSB_STD_REQUEST_H_ */
+
+/** @} */