From 0e40d55d9f6894aec2dfc844e8ea89756b0306fe Mon Sep 17 00:00:00 2001 From: "dzzxzz@gmail.com" Date: Thu, 20 Dec 2012 07:25:19 +0000 Subject: fixed the coding style of RT_DEBUG_LOG git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2500 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- components/drivers/usb/usbdevice/core/core.c | 3 ++- components/drivers/usb/usbhost/class/adk.c | 18 +++++++++--------- components/drivers/usb/usbhost/core/core.c | 15 ++++++++------- 3 files changed, 19 insertions(+), 17 deletions(-) (limited to 'components') diff --git a/components/drivers/usb/usbdevice/core/core.c b/components/drivers/usb/usbdevice/core/core.c index 0c5be97ca7..a09849ffe1 100644 --- a/components/drivers/usb/usbdevice/core/core.c +++ b/components/drivers/usb/usbdevice/core/core.c @@ -512,7 +512,8 @@ static rt_err_t _setup_request(udevice_t device, ureq_t setup) RT_ASSERT(setup != RT_NULL); RT_DEBUG_LOG(RT_DEBUG_USB, ("[\n")); - RT_DEBUG_LOG(RT_DEBUG_USB, ("setup_request_handler 0x%x\n", setup->request_type)); + RT_DEBUG_LOG(RT_DEBUG_USB, ("setup_request_handler 0x%x\n", + setup->request_type)); RT_DEBUG_LOG(RT_DEBUG_USB, ("value 0x%x\n", setup->value)); RT_DEBUG_LOG(RT_DEBUG_USB, ("length 0x%x\n", setup->length)); RT_DEBUG_LOG(RT_DEBUG_USB, ("index 0x%x\n", setup->index)); diff --git a/components/drivers/usb/usbhost/class/adk.c b/components/drivers/usb/usbhost/class/adk.c index 208d70a090..0f1d409793 100644 --- a/components/drivers/usb/usbhost/class/adk.c +++ b/components/drivers/usb/usbhost/class/adk.c @@ -223,7 +223,7 @@ static rt_err_t rt_usb_adk_run(void* arg) return -RT_EIO; } - RT_DEBUG_LOG(RT_DEBUG_USB,("rt_usb_adk_run\n")); + RT_DEBUG_LOG(RT_DEBUG_USB, ("rt_usb_adk_run\n")); dev_desc = &ifinst->uinst->dev_desc; if(dev_desc->idVendor == USB_ACCESSORY_VENDOR_ID && @@ -232,11 +232,11 @@ static rt_err_t rt_usb_adk_run(void* arg) { if(ifinst->intf_desc->bInterfaceSubClass != 0xFF) return -RT_ERROR; - RT_DEBUG_LOG(RT_DEBUG_USB,("found android accessory device\n")); + RT_DEBUG_LOG(RT_DEBUG_USB, ("found android accessory device\n")); } else { - RT_DEBUG_LOG(RT_DEBUG_USB,("switch device\n")); + RT_DEBUG_LOG(RT_DEBUG_USB, ("switch device\n")); if((ret = rt_usb_adk_get_protocol(ifinst, &protocol)) != RT_EOK) { @@ -263,12 +263,12 @@ static rt_err_t rt_usb_adk_run(void* arg) rt_usb_adk_send_string(ifinst, ACCESSORY_STRING_SERIAL, _adk_serial); - RT_DEBUG_LOG(RT_DEBUG_USB,("manufacturer %s\n", _adk_manufacturer)); - RT_DEBUG_LOG(RT_DEBUG_USB,("model %s\n", _adk_model)); - RT_DEBUG_LOG(RT_DEBUG_USB,("description %s\n", _adk_description)); - RT_DEBUG_LOG(RT_DEBUG_USB,("version %s\n", _adk_version)); - RT_DEBUG_LOG(RT_DEBUG_USB,("uri %s\n", _adk_uri)); - RT_DEBUG_LOG(RT_DEBUG_USB,("serial %s\n", _adk_serial)); + RT_DEBUG_LOG(RT_DEBUG_USB, ("manufacturer %s\n", _adk_manufacturer)); + RT_DEBUG_LOG(RT_DEBUG_USB, ("model %s\n", _adk_model)); + RT_DEBUG_LOG(RT_DEBUG_USB, ("description %s\n", _adk_description)); + RT_DEBUG_LOG(RT_DEBUG_USB, ("version %s\n", _adk_version)); + RT_DEBUG_LOG(RT_DEBUG_USB, ("uri %s\n", _adk_uri)); + RT_DEBUG_LOG(RT_DEBUG_USB, ("serial %s\n", _adk_serial)); if((ret = rt_usb_adk_start(ifinst)) != RT_EOK) { diff --git a/components/drivers/usb/usbhost/core/core.c b/components/drivers/usb/usbhost/core/core.c index 755b8c0ac2..956f283b95 100644 --- a/components/drivers/usb/usbhost/core/core.c +++ b/components/drivers/usb/usbhost/core/core.c @@ -100,8 +100,8 @@ rt_err_t rt_usb_attatch_instance(uinst_t uinst) /* set device max packet size */ uinst->max_packet_size = uinst->dev_desc.bMaxPacketSize0; - RT_DEBUG_LOG(RT_DEBUG_USB, ("get device descriptor length %d\n", - dev_desc->bLength)); + RT_DEBUG_LOG(RT_DEBUG_USB, ("get device descriptor length %d\n", + dev_desc->bLength)); /* get full device descriptor again */ ret = rt_usb_get_descriptor @@ -152,7 +152,8 @@ rt_err_t rt_usb_attatch_instance(uinst_t uinst) } RT_DEBUG_LOG(RT_DEBUG_USB, ("interface class 0x%x, subclass 0x%x\n", - intf_desc->bInterfaceClass, intf_desc->bInterfaceSubClass)); + intf_desc->bInterfaceClass, + intf_desc->bInterfaceSubClass)); /* find driver by class code found in interface descriptor */ drv = rt_usb_class_driver_find(intf_desc->bInterfaceClass, @@ -406,8 +407,8 @@ rt_err_t rt_usb_get_interface_descriptor(ucfg_desc_t cfg_desc, int num, { *intf_desc = (uintf_desc_t)desc; - RT_DEBUG_LOG(RT_DEBUG_USB, - ("rt_usb_get_interface_descriptor: %d\n", num)); + RT_DEBUG_LOG(RT_DEBUG_USB, + ("rt_usb_get_interface_descriptor: %d\n", num)); return RT_EOK; } } @@ -453,8 +454,8 @@ rt_err_t rt_usb_get_endpoint_descriptor(uintf_desc_t intf_desc, int num, { *ep_desc = (uep_desc_t)desc; - RT_DEBUG_LOG(RT_DEBUG_USB, - ("rt_usb_get_endpoint_descriptor: %d\n", num)); + RT_DEBUG_LOG(RT_DEBUG_USB, + ("rt_usb_get_endpoint_descriptor: %d\n", num)); return RT_EOK; } else count++; -- cgit v1.3.1