X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/9d18e10afb2439a6a9ba6978a799259746a837b7..b62e04839e483eb0998029320397cc77324a4a6e:/sysdefs.h diff --git a/sysdefs.h b/sysdefs.h index bf79c8e..4f2ebb0 100644 --- a/sysdefs.h +++ b/sysdefs.h @@ -43,10 +43,33 @@ #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 + +#ifndef TRUE #define TRUE true +#endif +#ifndef FALSE #define FALSE false +#endif typedef volatile uint8_t REG8; typedef volatile uint16_t REG16;