提交 f8f3e0e5 编写于 作者: M Michal Simek

usb_kbd: Add support for watchdog

There is need to service watchdog in while loop or system will be
restarted when idlying.
Signed-off-by: NMichal Simek <michal.simek@xilinx.com>
上级 b4f01584
......@@ -13,6 +13,7 @@
#include <malloc.h>
#include <memalign.h>
#include <stdio_dev.h>
#include <watchdog.h>
#include <asm/byteorder.h>
#include <usb.h>
......@@ -387,8 +388,10 @@ static int usb_kbd_getc(struct stdio_dev *sdev)
usb_kbd_dev = (struct usb_device *)dev->priv;
data = usb_kbd_dev->privptr;
while (data->usb_in_pointer == data->usb_out_pointer)
while (data->usb_in_pointer == data->usb_out_pointer) {
WATCHDOG_RESET();
usb_kbd_poll_for_event(usb_kbd_dev);
}
if (data->usb_out_pointer == USB_KBD_BUFFER_LEN - 1)
data->usb_out_pointer = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册