Update for new Chopstx API.

This commit is contained in:
NIIBE Yutaka
2018-09-26 13:24:19 +09:00
parent 8a5e0eb783
commit 030a9c576d
5 changed files with 14 additions and 3 deletions

View File

@@ -1,3 +1,11 @@
2018-09-26 NIIBE Yutaka <gniibe@fsij.org>
* chopstx: Update.
* src/usb-ccid.c (usb_event_handle): Fix for chopstx_intr_done.
* src/pin-cir.c (tim_main, ext_main): Likewise.
* src/configure (FST_01SZ): Set MHZ=96.
2018-07-04 Szczepan Zalega <szczepan@nitrokey.com> 2018-07-04 Szczepan Zalega <szczepan@nitrokey.com>
* tool/upgrade_by_passwd.py: Catch exception, when no KDF data is * tool/upgrade_by_passwd.py: Catch exception, when no KDF data is

Submodule chopstx updated: 802dbbd639...43bbdb44dc

2
src/configure vendored
View File

@@ -198,7 +198,7 @@ STBEE)
if test "$with_dfu" = "default"; then if test "$with_dfu" = "default"; then
with_dfu=yes; with_dfu=yes;
fi ;; fi ;;
BLUE_PILL_G) FST_01SZ|BLUE_PILL_G)
MHZ=96 MHZ=96
;; ;;
*) *)

View File

@@ -986,6 +986,7 @@ tim_main (void *arg)
{ {
chopstx_intr_wait (&interrupt); chopstx_intr_wait (&interrupt);
cir_timer_interrupt (); cir_timer_interrupt ();
chopstx_intr_done (&interrupt);
} }
return NULL; return NULL;
@@ -1006,6 +1007,7 @@ ext_main (void *arg)
{ {
chopstx_intr_wait (&interrupt); chopstx_intr_wait (&interrupt);
cir_ext_interrupt (); cir_ext_interrupt ();
chopstx_intr_done (&interrupt);
} }
return NULL; return NULL;

View File

@@ -1561,6 +1561,7 @@ extern int usb_get_descriptor (struct usb_dev *dev);
extern void random_init (void); extern void random_init (void);
extern void random_fini (void); extern void random_fini (void);
static chopstx_intr_t interrupt;
/* /*
* Return 0 for normal USB event * Return 0 for normal USB event
@@ -1575,6 +1576,7 @@ usb_event_handle (struct usb_dev *dev)
e = usb_lld_event_handler (dev); e = usb_lld_event_handler (dev);
ep_num = USB_EVENT_ENDP (e); ep_num = USB_EVENT_ENDP (e);
chopstx_intr_done (&interrupt);
/* Transfer to endpoint (not control endpoint) */ /* Transfer to endpoint (not control endpoint) */
if (ep_num != 0) if (ep_num != 0)
@@ -1674,7 +1676,6 @@ usb_event_handle (struct usb_dev *dev)
} }
static chopstx_intr_t interrupt;
static chopstx_poll_cond_t ccid_event_poll_desc; static chopstx_poll_cond_t ccid_event_poll_desc;
static struct chx_poll_head *const ccid_poll[] = { static struct chx_poll_head *const ccid_poll[] = {
(struct chx_poll_head *const)&interrupt, (struct chx_poll_head *const)&interrupt,