split up some headers + rename markdown_io to parser
[smdp.git] / include / bitops.h
diff --git a/include/bitops.h b/include/bitops.h
new file mode 100644 (file)
index 0000000..e18f3b0
--- /dev/null
@@ -0,0 +1,9 @@
+#if !defined( BITOPS_H )
+#define BITOPS_H
+
+#define SET_BIT(var, pos)    ((var) |= (1<<(pos)))
+#define CLEAR_BIT(var, pos)  ((var) &= (~(1<<(pos))))
+#define TOGGLE_BIT(var, pos) ((var) ^= (1<<(pos)))
+#define CHECK_BIT(var, pos)  ((var) &  (1<<(pos)))
+
+#endif // !defined( BITOPS_H )