projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove CONFIG_WATCHDOG stuff: watchdog macros expand to nothing when wdt is active.
[bertos.git]
/
cfg
/
macros.h
diff --git
a/cfg/macros.h
b/cfg/macros.h
index ba7b561dd114f576de3252e8c530e95c508bb99c..45f0a1edfa91ba8b644d2ce34b7eb826ad6a4b33 100755
(executable)
--- a/
cfg/macros.h
+++ b/
cfg/macros.h
@@
-14,6
+14,9
@@
/*#*
*#* $Log$
/*#*
*#* $Log$
+ *#* Revision 1.11 2007/02/06 15:22:12 asterix
+ *#* Add ROTL and ROTR macros for bit rotating.
+ *#*
*#* Revision 1.10 2006/09/13 18:31:37 bernie
*#* BV8(), BV16(), BV32(): New macros for CPUs with small word size; SWAP_T(): New macro to support old compilers.
*#*
*#* Revision 1.10 2006/09/13 18:31:37 bernie
*#* BV8(), BV16(), BV32(): New macros for CPUs with small word size; SWAP_T(): New macro to support old compilers.
*#*
@@
-339,5
+342,13
@@
#endif /* COMPILER_VARIADIC_MACROS */
#endif /* COMPILER_VARIADIC_MACROS */
+/**
+ * Macro for rotating bit left or right.
+ * \{
+ */
+#define ROTR(var, rot) (((var) >> (rot)) | ((var) << ((sizeof(var) * 8) - (rot))))
+#define ROTL(var, rot) (((var) << (rot)) | ((var) >> ((sizeof(var) * 8) - (rot))))
+/*\}*/
+
#endif /* MACROS_H */
#endif /* MACROS_H */