SAME54P20A Test Project
core.h
1 #ifndef _CORE_H_
2 #define _CORE_H_
3 
4 #include "sam.h"
5 
6 void mcu_init(void);
7 
8 void atomic_enter_critical(uint32_t volatile* atomic);
9 void atomic_leave_critical(uint32_t volatile* atomic);
10 
11 #define CRITICAL_SECTION_ENTER() \
12  {\
13  volatile uint32_t __atomic;\
14  atomic_enter_critical(&__atomic);
15 
16 #define CRITICAL_SECTION_LEAVE() \
17  atomic_leave_critical(&__atomic); \
18  }
19 #endif
sam.h
Top level header file.