X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/d537298fdd7d39e4cb0e74e8e6d227245d638afe..8a947d16e5132fd133d67c76468c6323881de221:/sysdefs.h diff --git a/sysdefs.h b/sysdefs.h index 9b786b4..4f2ebb0 100644 --- a/sysdefs.h +++ b/sysdefs.h @@ -43,6 +43,24 @@ #include #include +#ifndef ASM +# define ASM __asm volatile +#endif + +#ifndef INLINE +# if __GNUC__ && !__GNUC_STDC_INLINE__ +# define INLINE extern inline +# else +# define INLINE inline +# endif +#endif + +// GCC does not inline any functions when not optimizing unless you specify +// the 'always_inline' attribute for the function +#ifndef INLINE_POST +# define INLINE_POST __attribute__((always_inline)) +#endif + // Stay compatible with ugly "windows" style #define BOOL bool