Fix MKL27Z USB.

This commit is contained in:
NIIBE Yutaka
2017-06-15 10:48:35 +09:00
parent 7798e620a6
commit b2b0eb7418
2 changed files with 8 additions and 4 deletions

View File

@@ -1,3 +1,7 @@
2017-06-16 NIIBE Yutaka <gniibe@fsij.org>
* mcu/usb-mkl27z.c (std_get_status): Use staic var, not auto.
2017-05-18 NIIBE Yutaka <gniibe@fsij.org>
* chopstx.c (chx_wakeup): Fix access to REG_R0.

View File

@@ -445,7 +445,7 @@ handle_datastage_in (struct usb_dev *dev, uint8_t stat)
{
/* No more data to send, proceed to receive OUT acknowledge. */
dev->state = WAIT_STATUS_OUT;
kl27z_prepare_ep0_out (&dev->dev_req, 8, DATA1);
kl27z_prepare_ep0_out (&dev->dev_req, 0, DATA1);
}
return;
@@ -470,12 +470,13 @@ std_none (struct usb_dev *dev)
return -1;
}
static uint16_t status_info;
static int
std_get_status (struct usb_dev *dev)
{
struct device_req *arg = &dev->dev_req;
uint8_t rcp = arg->type & RECIPIENT;
uint16_t status_info = 0;
if (arg->value != 0 || arg->len != 2 || (arg->index >> 8) != 0
|| USB_SETUP_SET (arg->type))
@@ -1000,7 +1001,6 @@ usb_lld_ctrl_send (struct usb_dev *dev, const void *buf, size_t buflen)
dev->state = IN_DATA;
}
if (len)
kl27z_prepare_ep0_in (data_p->addr, len, DATA1);
data_p->len -= len;