libDaisy
Hardware Library for Daisy
Toggle main menu visibility
Introduction
Related Pages
Additional Resources
Electrosmith Website
Daisy Seed Product Page
Daisy Web Programmer
Daisy Seed Datasheet
DaisySP DSP Library Documentation
Daisy Forum
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
a
b
c
d
f
g
i
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
Related Symbols
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
w
Functions
Variables
Macros
_
a
b
c
d
e
f
i
l
m
n
o
p
q
r
s
t
u
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
scopedirqblocker.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <stdint.h>
4
5
#ifndef UNIT_TEST
// provide dummy implementation for unit tests
6
extern
"C"
7
{
8
#include <cmsis_gcc.h>
9
}
10
11
namespace
daisy
12
{
14
class
ScopedIrqBlocker
15
{
16
public
:
17
ScopedIrqBlocker
()
18
{
19
prim_ = __get_PRIMASK();
20
__disable_irq();
21
}
17
ScopedIrqBlocker
() {
…
}
22
23
~ScopedIrqBlocker
()
24
{
25
if
(!prim_)
26
__enable_irq();
27
}
23
~ScopedIrqBlocker
() {
…
}
28
29
private
:
30
uint32_t prim_;
31
};
14
class
ScopedIrqBlocker
{
…
};
32
}
// namespace daisy
33
34
#else
// ifndef UNIT_TEST
35
36
namespace
daisy
37
{
39
class
ScopedIrqBlocker
40
{
41
public
:
42
ScopedIrqBlocker
(){};
43
~ScopedIrqBlocker
() =
default
;
44
};
45
}
// namespace daisy
46
47
#endif
daisy::ScopedIrqBlocker
Definition
scopedirqblocker.h:15
daisy::ScopedIrqBlocker::~ScopedIrqBlocker
~ScopedIrqBlocker()
Definition
scopedirqblocker.h:23
daisy::ScopedIrqBlocker::ScopedIrqBlocker
ScopedIrqBlocker()
Definition
scopedirqblocker.h:17
daisy
Hardware defines and helpers for daisy field platform.
Definition
index.h:2
src
util
scopedirqblocker.h