File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed
Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -47,4 +47,26 @@ int32_t sftk_byte_swap(int32_t i);
4747void sftk_delay_ms (uint32_t ms );
4848
4949// ticks in milliseconds
50- uint32_t sftk_ticks_ms (void );
50+ uint32_t sftk_ticks_ms (void );
51+
52+ /**
53+ * @brief Check if specific bits are set in a value.
54+ *
55+ * This macro checks if the bits specified by the bitmask are set in the given value.
56+ *
57+ * @param __value__ The value to check.
58+ * @param __bitmask__ The bitmask specifying which bits to check.
59+ * @return True if all bits specified by the bitmask are set, false otherwise.
60+ */ .
61+ #define SFTK_CHECK_BITS_SET (__value__ , __bitmask__ ) (((__value__) & (__bitmask__)) == __bitmask__)
62+
63+ /**
64+ * @brief Check if specific bits are cleared in a value.
65+ *
66+ * This macro checks if the bits specified by the bitmask are cleared in the given value.
67+ *
68+ * @param __value__ The value to check.
69+ * @param __bitmask__ The bitmask specifying which bits to check.
70+ * @return True if all bits specified by the bitmask are cleared, false otherwise.
71+ */
72+ #define SFTK_CHECK_BITS_CLEARED (__value__ , __bitmask__ ) (((__value__) & (__bitmask__)) == 0)
You can’t perform that action at this time.
0 commit comments