diff options
author | root <root@new-selene.erebei.org> | 2015-12-01 10:51:56 +0000 |
---|---|---|
committer | root <root@new-selene.erebei.org> | 2015-12-01 10:51:56 +0000 |
commit | bc832d6d342922a828aebb997d1d9c6626898487 (patch) | |
tree | 655249961aa9abdc64e9a0227ddb0d114d4b7fd5 /app/usb.c | |
parent | 15f6f34fe239b0b71cb2ef4fd16f278a23b52506 (diff) | |
download | candlestick-bc832d6d342922a828aebb997d1d9c6626898487.tar.gz candlestick-bc832d6d342922a828aebb997d1d9c6626898487.tar.bz2 candlestick-bc832d6d342922a828aebb997d1d9c6626898487.zip |
fish
Diffstat (limited to 'app/usb.c')
-rw-r--r-- | app/usb.c | 24 |
1 files changed, 15 insertions, 9 deletions
@@ -58,22 +58,25 @@ usbd_device *usbd_dev; int usb_is_suspended = 0; -int usb_running =0; +int usb_running = 0; static int time_since_sof; -void usb_tick(void) +void +usb_tick (void) { -time_since_sof++; -if (time_since_sof>3000) usb_running=0; + time_since_sof++; + if (time_since_sof > 3000) + usb_running = 0; } -static void usb_sof(void) +static void +usb_sof (void) { -usb_running=1; -time_since_sof=0; + usb_running = 1; + time_since_sof = 0; } static void @@ -184,7 +187,7 @@ usb_init (void) usbd_register_set_config_callback (usbd_dev, usb_set_config); usbd_register_suspend_callback (usbd_dev, usb_suspended); usbd_register_resume_callback (usbd_dev, usb_resumed); - usbd_register_sof_callback(usbd_dev, usb_sof); + usbd_register_sof_callback (usbd_dev, usb_sof); } @@ -192,5 +195,8 @@ void usb_run (void) { for (;;) - usbd_poll (usbd_dev); + { + usbd_poll (usbd_dev); + crypto_poll (); + } } |