]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiUsbLib/UsbDxeLib.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / UefiUsbLib / UsbDxeLib.c
index a15ef6ebefc5db582c8a19576cbf811581240a6b..53b90984f72b3939a1b6e2587e6471e1414612ed 100644 (file)
@@ -1,23 +1,15 @@
 /** @file\r
 \r
-  The library provides the USB Standard Device Requests defined \r
+  The library provides the USB Standard Device Requests defined\r
   in Usb specification 9.4 section.\r
-  \r
-  Copyright (c) 2004 - 2007, Intel Corporation All rights\r
-  reserved. This program and the accompanying materials are\r
-  licensed and made available under the terms and conditions of\r
-  the BSD License which accompanies this distribution.  The full\r
-  text of the license may be found at\r
-  http://opensource.org/licenses/bsd-license.php\r
-  \r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+  Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
 #include "UefiUsbLibInternal.h"\r
 \r
-\r
 /**\r
   Get the descriptor of the specified USB device.\r
 \r
@@ -37,7 +29,7 @@
 \r
   @retval EFI_SUCCESS           The request executed successfully.\r
   @retval EFI_OUT_OF_RESOURCES  The request could not be completed because the\r
-                                buffer specifed by DescriptorLength and Descriptor\r
+                                buffer specified by DescriptorLength and Descriptor\r
                                 is not large enough to hold the result of the request.\r
   @retval EFI_TIMEOUT           A timeout occurred executing the request.\r
   @retval EFI_DEVICE_ERROR      The request failed due to a device error. The transfer\r
 EFI_STATUS\r
 EFIAPI\r
 UsbGetDescriptor (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  UINT16                  Value,\r
-  IN  UINT16                  Index,\r
-  IN  UINT16                  DescriptorLength,\r
-  OUT VOID                    *Descriptor,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL  *UsbIo,\r
+  IN  UINT16               Value,\r
+  IN  UINT16               Index,\r
+  IN  UINT16               DescriptorLength,\r
+  OUT VOID                 *Descriptor,\r
+  OUT UINT32               *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -63,24 +55,23 @@ UsbGetDescriptor (
 \r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
-  DevReq.RequestType  = USB_DEV_GET_DESCRIPTOR_REQ_TYPE;\r
-  DevReq.Request      = USB_REQ_GET_DESCRIPTOR;\r
-  DevReq.Value        = Value;\r
-  DevReq.Index        = Index;\r
-  DevReq.Length       = DescriptorLength;\r
+  DevReq.RequestType = USB_DEV_GET_DESCRIPTOR_REQ_TYPE;\r
+  DevReq.Request     = USB_REQ_GET_DESCRIPTOR;\r
+  DevReq.Value       = Value;\r
+  DevReq.Index       = Index;\r
+  DevReq.Length      = DescriptorLength;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   Descriptor,\r
                   DescriptorLength,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Set the descriptor of the specified USB device.\r
 \r
@@ -107,12 +98,12 @@ UsbGetDescriptor (
 EFI_STATUS\r
 EFIAPI\r
 UsbSetDescriptor (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  UINT16                  Value,\r
-  IN  UINT16                  Index,\r
-  IN  UINT16                  DescriptorLength,\r
-  IN  VOID                    *Descriptor,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL  *UsbIo,\r
+  IN  UINT16               Value,\r
+  IN  UINT16               Index,\r
+  IN  UINT16               DescriptorLength,\r
+  IN  VOID                 *Descriptor,\r
+  OUT UINT32               *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -123,24 +114,23 @@ UsbSetDescriptor (
 \r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
-  DevReq.RequestType  = USB_DEV_SET_DESCRIPTOR_REQ_TYPE;\r
-  DevReq.Request      = USB_REQ_SET_DESCRIPTOR;\r
-  DevReq.Value        = Value;\r
-  DevReq.Index        = Index;\r
-  DevReq.Length       = DescriptorLength;\r
+  DevReq.RequestType = USB_DEV_SET_DESCRIPTOR_REQ_TYPE;\r
+  DevReq.Request     = USB_REQ_SET_DESCRIPTOR;\r
+  DevReq.Value       = Value;\r
+  DevReq.Index       = Index;\r
+  DevReq.Length      = DescriptorLength;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataOut,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   Descriptor,\r
                   DescriptorLength,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Get the interface setting of the specified USB device.\r
 \r
@@ -165,10 +155,10 @@ UsbSetDescriptor (
 EFI_STATUS\r
 EFIAPI\r
 UsbGetInterface (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  UINT16                  Interface,\r
-  OUT UINT8                   *AlternateSetting,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL  *UsbIo,\r
+  IN  UINT16               Interface,\r
+  OUT UINT16               *AlternateSetting,\r
+  OUT UINT32               *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -177,25 +167,26 @@ UsbGetInterface (
   ASSERT (AlternateSetting != NULL);\r
   ASSERT (Status != NULL);\r
 \r
+  *AlternateSetting = 0;\r
+\r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
-  DevReq.RequestType  = USB_DEV_GET_INTERFACE_REQ_TYPE;\r
-  DevReq.Request      = USB_REQ_GET_INTERFACE;\r
-  DevReq.Index        = Interface;\r
-  DevReq.Length       = 1;\r
+  DevReq.RequestType = USB_DEV_GET_INTERFACE_REQ_TYPE;\r
+  DevReq.Request     = USB_REQ_GET_INTERFACE;\r
+  DevReq.Index       = Interface;\r
+  DevReq.Length      = 1;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   AlternateSetting,\r
                   1,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Set the interface setting of the specified USB device.\r
 \r
@@ -219,10 +210,10 @@ UsbGetInterface (
 EFI_STATUS\r
 EFIAPI\r
 UsbSetInterface (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  UINT16                  Interface,\r
-  IN  UINT16                  AlternateSetting,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL  *UsbIo,\r
+  IN  UINT16               Interface,\r
+  IN  UINT16               AlternateSetting,\r
+  OUT UINT32               *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -232,23 +223,22 @@ UsbSetInterface (
 \r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
-  DevReq.RequestType  = USB_DEV_SET_INTERFACE_REQ_TYPE;\r
-  DevReq.Request      = USB_REQ_SET_INTERFACE;\r
-  DevReq.Value        = AlternateSetting;\r
-  DevReq.Index        = Interface;\r
+  DevReq.RequestType = USB_DEV_SET_INTERFACE_REQ_TYPE;\r
+  DevReq.Request     = USB_REQ_SET_INTERFACE;\r
+  DevReq.Value       = AlternateSetting;\r
+  DevReq.Index       = Interface;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Get the device configuration.\r
 \r
@@ -272,9 +262,9 @@ UsbSetInterface (
 EFI_STATUS\r
 EFIAPI\r
 UsbGetConfiguration (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  OUT UINT8                   *ConfigurationValue,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL  *UsbIo,\r
+  OUT UINT16               *ConfigurationValue,\r
+  OUT UINT32               *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -283,24 +273,25 @@ UsbGetConfiguration (
   ASSERT (ConfigurationValue != NULL);\r
   ASSERT (Status != NULL);\r
 \r
+  *ConfigurationValue = 0;\r
+\r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
-  DevReq.RequestType  = USB_DEV_GET_CONFIGURATION_REQ_TYPE;\r
-  DevReq.Request      = USB_REQ_GET_CONFIG;\r
-  DevReq.Length       = 1;\r
+  DevReq.RequestType = USB_DEV_GET_CONFIGURATION_REQ_TYPE;\r
+  DevReq.Request     = USB_REQ_GET_CONFIG;\r
+  DevReq.Length      = 1;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   ConfigurationValue,\r
                   1,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Set the device configuration.\r
 \r
@@ -323,9 +314,9 @@ UsbGetConfiguration (
 EFI_STATUS\r
 EFIAPI\r
 UsbSetConfiguration (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  UINT16                  ConfigurationValue,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL  *UsbIo,\r
+  IN  UINT16               ConfigurationValue,\r
+  OUT UINT32               *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -335,22 +326,21 @@ UsbSetConfiguration (
 \r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
-  DevReq.RequestType  = USB_DEV_SET_CONFIGURATION_REQ_TYPE;\r
-  DevReq.Request      = USB_REQ_SET_CONFIG;\r
-  DevReq.Value        = ConfigurationValue;\r
+  DevReq.RequestType = USB_DEV_SET_CONFIGURATION_REQ_TYPE;\r
+  DevReq.Request     = USB_REQ_SET_CONFIG;\r
+  DevReq.Value       = ConfigurationValue;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Set the specified feature of the specified device.\r
 \r
@@ -377,11 +367,11 @@ UsbSetConfiguration (
 EFI_STATUS\r
 EFIAPI\r
 UsbSetFeature (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  USB_TYPES_DEFINITION    Recipient,\r
-  IN  UINT16                  Value,\r
-  IN  UINT16                  Target,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL   *UsbIo,\r
+  IN  USB_TYPES_DEFINITION  Recipient,\r
+  IN  UINT16                Value,\r
+  IN  UINT16                Target,\r
+  OUT UINT32                *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -392,39 +382,40 @@ UsbSetFeature (
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
   switch (Recipient) {\r
+    case USB_TARGET_DEVICE:\r
+      DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_D;\r
+      break;\r
 \r
-  case USB_TARGET_DEVICE:\r
-    DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_D;\r
-    break;\r
+    case USB_TARGET_INTERFACE:\r
+      DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_I;\r
+      break;\r
 \r
-  case USB_TARGET_INTERFACE:\r
-    DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_I;\r
-    break;\r
+    case USB_TARGET_ENDPOINT:\r
+      DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_E;\r
+      break;\r
 \r
-  case USB_TARGET_ENDPOINT:\r
-    DevReq.RequestType = USB_DEV_SET_FEATURE_REQ_TYPE_E;\r
-    break;\r
+    default:\r
+      break;\r
   }\r
+\r
   //\r
   // Fill device request, see USB1.1 spec\r
   //\r
-  DevReq.Request  = USB_REQ_SET_FEATURE;\r
-  DevReq.Value    = Value;\r
-  DevReq.Index    = Target;\r
-\r
+  DevReq.Request = USB_REQ_SET_FEATURE;\r
+  DevReq.Value   = Value;\r
+  DevReq.Index   = Target;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Clear the specified feature of the specified device.\r
 \r
@@ -451,11 +442,11 @@ UsbSetFeature (
 EFI_STATUS\r
 EFIAPI\r
 UsbClearFeature (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  USB_TYPES_DEFINITION    Recipient,\r
-  IN  UINT16                  Value,\r
-  IN  UINT16                  Target,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL   *UsbIo,\r
+  IN  USB_TYPES_DEFINITION  Recipient,\r
+  IN  UINT16                Value,\r
+  IN  UINT16                Target,\r
+  OUT UINT32                *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -463,43 +454,43 @@ UsbClearFeature (
   ASSERT (UsbIo != NULL);\r
   ASSERT (Status != NULL);\r
 \r
-\r
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
   switch (Recipient) {\r
+    case USB_TARGET_DEVICE:\r
+      DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_D;\r
+      break;\r
 \r
-  case USB_TARGET_DEVICE:\r
-    DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_D;\r
-    break;\r
+    case USB_TARGET_INTERFACE:\r
+      DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_I;\r
+      break;\r
 \r
-  case USB_TARGET_INTERFACE:\r
-    DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_I;\r
-    break;\r
+    case USB_TARGET_ENDPOINT:\r
+      DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_E;\r
+      break;\r
 \r
-  case USB_TARGET_ENDPOINT:\r
-    DevReq.RequestType = USB_DEV_CLEAR_FEATURE_REQ_TYPE_E;\r
-    break;\r
+    default:\r
+      break;\r
   }\r
+\r
   //\r
   // Fill device request, see USB1.1 spec\r
   //\r
-  DevReq.Request  = USB_REQ_CLEAR_FEATURE;\r
-  DevReq.Value    = Value;\r
-  DevReq.Index    = Target;\r
-\r
+  DevReq.Request = USB_REQ_CLEAR_FEATURE;\r
+  DevReq.Value   = Value;\r
+  DevReq.Index   = Target;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbNoData,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   NULL,\r
                   0,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Get the status of the specified device.\r
 \r
@@ -527,11 +518,11 @@ UsbClearFeature (
 EFI_STATUS\r
 EFIAPI\r
 UsbGetStatus (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  USB_TYPES_DEFINITION    Recipient,\r
-  IN  UINT16                  Target,\r
-  OUT UINT16                  *DeviceStatus,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL   *UsbIo,\r
+  IN  USB_TYPES_DEFINITION  Recipient,\r
+  IN  UINT16                Target,\r
+  OUT UINT16                *DeviceStatus,\r
+  OUT UINT32                *Status\r
   )\r
 {\r
   EFI_USB_DEVICE_REQUEST  DevReq;\r
@@ -543,45 +534,47 @@ UsbGetStatus (
   ZeroMem (&DevReq, sizeof (EFI_USB_DEVICE_REQUEST));\r
 \r
   switch (Recipient) {\r
+    case USB_TARGET_DEVICE:\r
+      DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_D;\r
+      break;\r
 \r
-  case USB_TARGET_DEVICE:\r
-    DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_D;\r
-    break;\r
+    case USB_TARGET_INTERFACE:\r
+      DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_I;\r
+      break;\r
 \r
-  case USB_TARGET_INTERFACE:\r
-    DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_I;\r
-    break;\r
+    case USB_TARGET_ENDPOINT:\r
+      DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_E;\r
+      break;\r
 \r
-  case USB_TARGET_ENDPOINT:\r
-    DevReq.RequestType = USB_DEV_GET_STATUS_REQ_TYPE_E;\r
-    break;\r
+    default:\r
+      break;\r
   }\r
+\r
   //\r
   // Fill device request, see USB1.1 spec\r
   //\r
-  DevReq.Request  = USB_REQ_GET_STATUS;\r
-  DevReq.Value    = 0;\r
-  DevReq.Index    = Target;\r
-  DevReq.Length   = 2;\r
+  DevReq.Request = USB_REQ_GET_STATUS;\r
+  DevReq.Value   = 0;\r
+  DevReq.Index   = Target;\r
+  DevReq.Length  = 2;\r
 \r
   return UsbIo->UsbControlTransfer (\r
                   UsbIo,\r
                   &DevReq,\r
                   EfiUsbDataIn,\r
-                  TIMEOUT_VALUE,\r
+                  PcdGet32 (PcdUsbTransferTimeoutValue),\r
                   DeviceStatus,\r
                   2,\r
                   Status\r
                   );\r
 }\r
 \r
-\r
 /**\r
   Clear halt feature of the specified usb endpoint.\r
 \r
   Retrieve the USB endpoint descriptor specified by UsbIo and EndPoint.\r
   If the USB endpoint descriptor can not be retrieved, then return EFI_NOT_FOUND.\r
-  If the endpoint descriptor is found, then clear the halt fature of this USB endpoint.\r
+  If the endpoint descriptor is found, then clear the halt feature of this USB endpoint.\r
   The status of the transfer is returned in Status.\r
   If UsbIo is NULL, then ASSERT().\r
   If Status is NULL, then ASSERT().\r
@@ -600,9 +593,9 @@ UsbGetStatus (
 EFI_STATUS\r
 EFIAPI\r
 UsbClearEndpointHalt (\r
-  IN  EFI_USB_IO_PROTOCOL     *UsbIo,\r
-  IN  UINT8                   Endpoint,\r
-  OUT UINT32                  *Status\r
+  IN  EFI_USB_IO_PROTOCOL  *UsbIo,\r
+  IN  UINT8                Endpoint,\r
+  OUT UINT32               *Status\r
   )\r
 {\r
   EFI_STATUS                    Result;\r
@@ -615,7 +608,7 @@ UsbClearEndpointHalt (
 \r
   ZeroMem (&EndpointDescriptor, sizeof (EFI_USB_ENDPOINT_DESCRIPTOR));\r
   //\r
-  // First seach the endpoint descriptor for that endpoint addr\r
+  // First search the endpoint descriptor for that endpoint addr\r
   //\r
   Result = UsbIo->UsbGetInterfaceDescriptor (\r
                     UsbIo,\r
@@ -648,12 +641,12 @@ UsbClearEndpointHalt (
   }\r
 \r
   Result = UsbClearFeature (\r
-            UsbIo,\r
-            USB_TARGET_ENDPOINT,\r
-            USB_FEATURE_ENDPOINT_HALT,\r
-            EndpointDescriptor.EndpointAddress,\r
-            Status\r
-            );\r
+             UsbIo,\r
+             USB_TARGET_ENDPOINT,\r
+             USB_FEATURE_ENDPOINT_HALT,\r
+             EndpointDescriptor.EndpointAddress,\r
+             Status\r
+             );\r
 \r
   return Result;\r
 }\r