projects
/
pub
/
lufa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add in a new common Delay_MS() function, which provides a blocking delay for all...
[pub/lufa.git]
/
LUFA
/
Scheduler
/
Scheduler.h
diff --git
a/LUFA/Scheduler/Scheduler.h
b/LUFA/Scheduler/Scheduler.h
index
7aa5133
..
499a63a
100644
(file)
--- a/
LUFA/Scheduler/Scheduler.h
+++ b/
LUFA/Scheduler/Scheduler.h
@@
-219,10
+219,12
@@
ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
static inline void Scheduler_ResetDelay(SchedulerDelayCounter_t* const DelayCounter)
{
ATTR_NON_NULL_PTR_ARG(1) ATTR_ALWAYS_INLINE;
static inline void Scheduler_ResetDelay(SchedulerDelayCounter_t* const DelayCounter)
{
- ATOMIC_BLOCK(ATOMIC_RESTORESTATE)
- {
- *DelayCounter = Scheduler_TickCounter;
- }
+ uint_reg_t CurrentGlobalInt = USB_INT_GetGlobalEnableState();
+ USB_INT_GlobalDisable();
+
+ *DelayCounter = Scheduler_TickCounter;
+
+ USB_INT_SetGlobalEnableState(CurrentGlobalInt);
}
/* Function Prototypes: */
}
/* Function Prototypes: */