|
17 | 17 | /* |
18 | 18 | * Fixed-point type definitions |
19 | 19 | * |
20 | | - * "Qm.f" is a representation of a fixed-point type, |
21 | | - * where "m" bits are used for the integer part, |
22 | | - * "f" bits are used for the fractional part and 1 bit is used |
23 | | - * for the sign part. The total number of used bits is 1+m+f. |
| 20 | + * "Qm.f" is a representation of a fixed-point type, where "m" bits are used |
| 21 | + * for the integer part, "f" bits are used for the fractional part, and 1 bit |
| 22 | + * is used for the sign. The total number of used bits is 1 + m + f. |
24 | 23 | * |
25 | 24 | * twin_sfixed_t - A fixed-point type in the Q11.4 format. |
26 | 25 | * |
|
37 | 36 | * Max 2147483647 8388607.99609 |
38 | 37 | * Min -2147483648 -8388608 |
39 | 38 | * |
40 | | - * twin_gfixed_t - A fixed-point type in the Q1.6 format. |
41 | | - * And used in Glyph coordinates. |
| 39 | + * twin_gfixed_t - A fixed-point type in the Q1.6 format, used in Glyph |
| 40 | + * coordinates. |
42 | 41 | * |
43 | 42 | * Hex Binary Decimal Actual |
44 | 43 | * Max 0x7f 0111 1111 127 1.984375 |
45 | 44 | * Min 0x80 1000 0000 -128 -2 |
46 | 45 | * |
47 | | - * All of the above tables are based on the two's complement. |
| 46 | + * All of the above tables are based on two's complement representation. |
48 | 47 | */ |
49 | 48 | typedef int16_t twin_sfixed_t; |
50 | 49 | typedef int32_t twin_dfixed_t; |
@@ -531,9 +530,6 @@ void _twin_button_init(twin_button_t *button, |
531 | 530 | static inline int twin_clz(uint32_t v) |
532 | 531 | { |
533 | 532 | uint32_t leading_zero = 0; |
534 | | - /* Search from LSB to MSB for first set bit. |
535 | | - * Returns zero if no set bit is found. |
536 | | - */ |
537 | 533 | if (_BitScanReverse(&leading_zero, v)) |
538 | 534 | return 31 - leading_zero; |
539 | 535 | return 32; /* undefined behavior */ |
|
0 commit comments