mirror of
https://salsa.debian.org/gnuk-team/gnuk/gnuk.git
synced 2024-09-20 02:40:08 +00:00
Fix reGNUal upgrade
This commit is contained in:
parent
d68bee21e5
commit
1e004bec78
@ -1,6 +1,10 @@
|
||||
2016-05-19 Niibe Yutaka <gniibe@fsij.org>
|
||||
|
||||
* src/usb_ctrl.c (usb_cb_ctrl_write_finish): Set bDeviceState.
|
||||
|
||||
* src/usb-ccid.c: Rename from usb-icc.c.
|
||||
(ccid_thread): Handle reGNUal upgrade.
|
||||
|
||||
* src/Makefile.in (CSRC): Follow the change.
|
||||
|
||||
* chopstx: Update to 0.11.
|
||||
|
@ -1370,6 +1370,7 @@ ccid_usb_reset (void)
|
||||
void *
|
||||
ccid_thread (void *arg)
|
||||
{
|
||||
extern uint32_t bDeviceState;
|
||||
chopstx_intr_t interrupt;
|
||||
uint32_t timeout;
|
||||
|
||||
@ -1511,6 +1512,13 @@ ccid_thread (void *arg)
|
||||
c->application = 0;
|
||||
}
|
||||
|
||||
/* Loading reGNUal. */
|
||||
while (bDeviceState != UNCONNECTED)
|
||||
{
|
||||
chopstx_poll (NULL, 1, &interrupt);
|
||||
usb_interrupt_handler ();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -391,6 +391,7 @@ usb_cb_ctrl_write_finish (uint8_t req, uint8_t req_no, struct req_args *arg)
|
||||
{
|
||||
uint8_t type_rcp = req & (REQUEST_TYPE|RECIPIENT);
|
||||
|
||||
(void)arg;
|
||||
if (type_rcp == (VENDOR_REQUEST | DEVICE_RECIPIENT))
|
||||
{
|
||||
if (USB_SETUP_SET (req) && req_no == USB_FSIJ_GNUK_EXEC)
|
||||
@ -398,7 +399,7 @@ usb_cb_ctrl_write_finish (uint8_t req, uint8_t req_no, struct req_args *arg)
|
||||
if (*icc_state_p != ICC_STATE_EXITED)
|
||||
return;
|
||||
|
||||
(void)arg;
|
||||
bDeviceState = UNCONNECTED;
|
||||
usb_lld_prepare_shutdown (); /* No further USB communication */
|
||||
led_blink (LED_GNUK_EXEC); /* Notify the main. */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user