libDaisy
Hardware Library for Daisy
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
6extern "C"
7{
8#include <cmsis_gcc.h>
9}
10
11namespace daisy
12{
15{
16 public:
18 {
19 prim_ = __get_PRIMASK();
21 }
22
24 {
25 if(!prim_)
27 }
28
29 private:
30 uint32_t prim_;
31};
32} // namespace daisy
33
34#else // ifndef UNIT_TEST
35
36namespace daisy
37{
39class ScopedIrqBlocker
40{
41 public:
43 ~ScopedIrqBlocker() = default;
44};
45} // namespace daisy
46
47#endif
Definition leddriver.h:33
Definition scopedirqblocker.h:15
~ScopedIrqBlocker()
Definition scopedirqblocker.h:23
ScopedIrqBlocker()
Definition scopedirqblocker.h:17
Hardware defines and helpers for daisy field platform.
Definition index.h:2