mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-18 22:38:32 +03:00
Change directory structure to align with Atmel softpack
This way we can easily check with 'diff' for differences in our code and Atmel softpack. Also, this layout is more suitable for building various different firmware images (e.g. factory-test, dfu-loader, main application) for a variety of different boards (simtrace, owhw, qmod).
This commit is contained in:
18
firmware/libcommon/include/utils.h
Normal file
18
firmware/libcommon/include/utils.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
|
||||
#ifdef __ARM
|
||||
#define local_irq_save(x) \
|
||||
({ \
|
||||
x = __get_PRIMASK(); \
|
||||
__disable_irq(); \
|
||||
})
|
||||
|
||||
#define local_irq_restore(x) \
|
||||
__set_PRIMASK(x)
|
||||
#else
|
||||
#warning "local_irq_{save,restore}() not implemented"
|
||||
#define local_irq_save(x)
|
||||
#define local_irq_restore(x)
|
||||
#endif
|
||||
Reference in New Issue
Block a user