Fix critical section start/end
This commit is contained in:
parent
a85f60adb9
commit
35023b09ef
2 changed files with 8 additions and 8 deletions
|
|
@ -48,8 +48,8 @@
|
|||
|
||||
// Bracket code that shouldn't be interrupted
|
||||
#ifndef CRITICAL_SECTION_START
|
||||
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli();
|
||||
#define CRITICAL_SECTION_END SREG = _sreg;
|
||||
#define CRITICAL_SECTION_START unsigned char _sreg = SREG; cli()
|
||||
#define CRITICAL_SECTION_END SREG = _sreg
|
||||
#endif
|
||||
|
||||
#define ISRS_ENABLED() TEST(SREG, SREG_I)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue