Skip to content

Commit 204f29a

Browse files
improve flag documentation
Signed-off-by: mateoconlechuga <matthewwaltzis@gmail.com>
1 parent 11fe69f commit 204f29a

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

src/ce/include/ti/flags.h

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,36 @@ void os_SetFlagByte(int offset, uint8_t set);
3333
uint8_t os_GetFlagByte(int offset);
3434

3535
/**
36-
* High 8 is unsigned offset, low 8 is bits to test
36+
* Check OS flag bits
37+
*
38+
* @param offset_pattern High 8 is unsigned offset, low 8 is bits to test
39+
* @returns 1 if set, 0 if not set
3740
*/
3841
int os_TestFlagBits(uint16_t offset_pattern);
39-
bool os_TestFlagBitsFast(uint16_t offset_pattern); /* Warning: has a bug if bits and flags are all set! */
42+
43+
/**
44+
* Set OS flag bits
45+
*
46+
* @param offset_pattern High 8 is unsigned offset, low 8 is bits to test
47+
*/
4048
void os_SetFlagBits(int16_t offset_pattern);
49+
50+
/**
51+
* Clear OS flag bits
52+
*
53+
* @param offset_pattern High 8 is unsigned offset, low 8 is bits to test
54+
*/
4155
void os_ResetFlagBits(int16_t offset_pattern);
4256

57+
/**
58+
* Faster (and worse) test of OS flag bits
59+
*
60+
* @param offset_pattern High 8 is unsigned offset, low 8 is bits to test
61+
* @warning Has a bug if bits and flags are all set!
62+
* @note This function is only available on OS 5.3.6 or later.
63+
*/
64+
bool os_TestFlagBitsFast(uint16_t offset_pattern);
65+
4366
/**
4467
* Converts a flag group name and member ID to a literal.
4568
* The `flag_` prefix is automatically taken care of.

0 commit comments

Comments
 (0)