summaryrefslogtreecommitdiff
path: root/components/drivers/usb/usbhost/class/ukbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'components/drivers/usb/usbhost/class/ukbd.c')
-rw-r--r--components/drivers/usb/usbhost/class/ukbd.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/components/drivers/usb/usbhost/class/ukbd.c b/components/drivers/usb/usbhost/class/ukbd.c
index 7d608de259..c89d60cd36 100644
--- a/components/drivers/usb/usbhost/class/ukbd.c
+++ b/components/drivers/usb/usbhost/class/ukbd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2018, RT-Thread Development Team
+ * Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
@@ -14,13 +14,13 @@
#if defined(RT_USBH_HID) && defined(RT_USBH_HID_KEYBOARD)
-static struct uprotocal kbd_protocal;
+static struct uprotocal kbd_protocal;
static rt_err_t rt_usbh_hid_kbd_callback(void* arg)
{
int int1, int2;
- struct uhid* hid;
-
+ struct uhid* hid;
+
hid = (struct uhid*)arg;
int1 = *(rt_uint32_t*)hid->buffer;
@@ -28,9 +28,9 @@ static rt_err_t rt_usbh_hid_kbd_callback(void* arg)
if(int1 != 0 || int2 != 0)
{
- RT_DEBUG_LOG(RT_DEBUG_USB, ("key down 0x%x, 0x%x\n", int1, int2));
+ RT_DEBUG_LOG(RT_DEBUG_USB, ("key down 0x%x, 0x%x\n", int1, int2));
}
-
+
return RT_EOK;
}
@@ -38,20 +38,20 @@ static rt_err_t rt_usbh_hid_kbd_init(void* arg)
{
struct uintf* intf = (struct uintf*)arg;
- RT_ASSERT(intf != RT_NULL);
-
+ RT_ASSERT(intf != RT_NULL);
+
rt_usbh_hid_set_protocal(intf, 0);
rt_usbh_hid_set_idle(intf, 10, 0);
- //RT_DEBUG_LOG(RT_DEBUG_USB, ("start usb keyboard\n"));
+ //RT_DEBUG_LOG(RT_DEBUG_USB, ("start usb keyboard\n"));
return RT_EOK;
}
/**
* This function will define the hid keyboard protocal, it will be register to the protocal list.
- *
+ *
* @return the keyboard protocal structure.
*/
uprotocal_t rt_usbh_hid_protocal_kbd(void)