|
38 | 38 | * |
39 | 39 | * Fixed BIT STRING with size 12. |
40 | 40 | * |
41 | | - * Wire Format (13 bits total): |
| 41 | + * Wire Format (12 bits total): |
42 | 42 | * ┌──────────────────────────────────────────────────────────────┐ |
43 | 43 | * │ Bits 0-11 │ |
44 | 44 | * ├──────────────────────────────────────────────────────────────┤ |
|
49 | 49 | * ────────────────────────────────────────────────────────────────────────────────────────── |
50 | 50 | * Max wire size = 12 bits ≤ 56-bit READ_BITS limit. |
51 | 51 | * We read all 12 bits in ONE call, then use bit arithmetic to extract: |
52 | | - * - Extension bit at position 11 (MSB of 12-bit value) |
53 | | - * - Flags at positions 0-11 (extended) or shifted for non-extended |
| 52 | + * - Flags at positions 0-11 |
54 | 53 | * |
55 | 54 | * 12-bit read layout (left-justified from bit 0): |
56 | | - * Non-extended: [Ext=0][F0..F11][-1 garbage bits] |
57 | | - * bit11 10..-1 -2..0 |
58 | | - * Extended: [Ext=1][nsnnwn:7][F0..F11] |
59 | | - * bit11 10..12 11..0 |
| 55 | + * [F0..F11] (12 flag bits, no extension marker) |
60 | 56 | * |
61 | 57 | * @todo Update the Doxygen to indicate [in] and [out] parameters |
62 | 58 | */ |
|
113 | 109 | * @note Internal use only. Not part of the public API. |
114 | 110 | */ |
115 | 111 | #define J2735_INTERNAL_RAW_READ_ALLOWED_MANEUVERS(buf) \ |
116 | | - J2735_READ_BITS((buf), 0U, J2735_INTERNAL_MAX_WIRE_BITS_ALLOWED_MANEUVERS) |
| 112 | + J2735_READ_BITS((buf), 0U, J2735_INTERNAL_ROOT_SIZE_ALLOWED_MANEUVERS) |
117 | 113 |
|
118 | 114 | /* ============================================================================================== */ |
119 | 115 | /* INTERNAL: Extension Bit Check */ |
|
169 | 165 | * @param[in] buf Pointer to the start of the AllowedManeuvers UPER encoding (const uint8_t*). |
170 | 166 | * @return Always 0 (false) - this type is not extensible. |
171 | 167 | */ |
172 | | -#define J2735_ALLOWED_MANEUVERS_IS_EXTENDED(buf) (0) |
| 168 | +#define J2735_ALLOWED_MANEUVERS_IS_EXTENDED(buf) ((void)(buf), 0) |
173 | 169 |
|
174 | 170 | /** |
175 | 171 | * @brief Get wire size of AllowedManeuvers in bits. |
|
179 | 175 | * @param[in] buf Pointer to the start of the AllowedManeuvers UPER encoding (const uint8_t*). |
180 | 176 | * @return Always 12U. |
181 | 177 | */ |
182 | | -#define J2735_ALLOWED_MANEUVERS_SIZE(buf) \ |
183 | | - (J2735_INTERNAL_EXTENSION_MARKER_BITS + J2735_INTERNAL_ROOT_SIZE_ALLOWED_MANEUVERS) |
| 178 | +#define J2735_ALLOWED_MANEUVERS_SIZE(buf) ((void)(buf), J2735_INTERNAL_ROOT_SIZE_ALLOWED_MANEUVERS) |
184 | 179 |
|
185 | 180 | /** |
186 | 181 | * @brief Get all AllowedManeuvers as a single uint16_t value. |
|
0 commit comments