Lines Matching refs:i_length
60 static inline void desc_set_length(uint8_t *p_desc, uint8_t i_length) in desc_set_length() argument
62 p_desc[1] = i_length; in desc_set_length()
77 uint8_t i, i_length = desc_get_length(p_desc); in desc_print_begin() local
78 char psz_value[2 * i_length + 1]; in desc_print_begin()
80 for (i = 0; i < i_length; i++) in desc_print_begin()
85 desc_get_tag(p_desc), i_length, psz_value); in desc_print_begin()
122 uint8_t i, i_length; in desc_print() local
130 i_length = desc_get_length(p_desc); in desc_print()
132 for (i = 0; i < i_length; i++) in desc_print()
137 desc_get_tag(p_desc), i_length, psz_value); in desc_print()
144 static inline uint8_t *descl_get_desc(uint8_t *p_descl, uint16_t i_length, in descl_get_desc() argument
150 if (p_desc + DESC_HEADER_SIZE - p_descl > i_length) return NULL; in descl_get_desc()
154 if (p_desc - p_descl >= i_length) return NULL; in descl_get_desc()
158 static inline bool descl_validate(const uint8_t *p_descl, uint16_t i_length) in descl_validate() argument
162 while (p_desc + DESC_HEADER_SIZE - p_descl <= i_length) in descl_validate()
165 return (p_desc - p_descl == i_length); in descl_validate()
174 static inline void descs_set_length(uint8_t *p_descs, uint16_t i_length) in descs_set_length() argument
177 p_descs[0] |= (i_length >> 8) & 0xf; in descs_set_length()
178 p_descs[1] = i_length & 0xff; in descs_set_length()