summaryrefslogtreecommitdiffstats
path: root/firmware/usbconfig.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usbconfig.h')
-rw-r--r--firmware/usbconfig.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/firmware/usbconfig.h b/firmware/usbconfig.h
index 8ccee36..dc5cafc 100644
--- a/firmware/usbconfig.h
+++ b/firmware/usbconfig.h
@@ -169,10 +169,15 @@ return;\
#ifndef __ASSEMBLER__
void calibrateOscillatorASM(void);
- extern uint16_t idlePolls;
-# define USB_RESET_HOOK(resetStarts) if(!resetStarts){ ((uint8_t*)&idlePolls)[1]= 0;calibrateOscillatorASM();}
+
+ #if AUTO_EXIT_NO_USB_MS>0
+ extern uint16_union_t idlePolls;
+ #define USB_RESET_HOOK(resetStarts) if(!resetStarts){ idlePolls.b[1]=0; calibrateOscillatorASM();}
+ #else
+ #define USB_RESET_HOOK(resetStarts) if(!resetStarts){ calibrateOscillatorASM();}
+ #endif
-# define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
+ #define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
#endif