Home
last modified time | relevance | path

Searched refs:frag_size (Results 1 – 8 of 8) sorted by relevance

/Zephyr-latest/tests/subsys/lorawan/frag_decoder/src/
Dfrag_encoder.c80 size_t coded_size, size_t frag_size, unsigned int redundant_frags) in lorawan_frag_encoder() argument
82 int uncoded_frags = DIV_ROUND_UP(uncoded_len, frag_size); in lorawan_frag_encoder()
84 uint8_t parity_vec[frag_size]; in lorawan_frag_encoder()
88 if (coded_size < coded_frags * frag_size) { in lorawan_frag_encoder()
95 memset(coded + uncoded_len, 0, uncoded_frags * frag_size - uncoded_len); in lorawan_frag_encoder()
101 uint8_t *out = coded + (uncoded_frags + i - 1) * frag_size; in lorawan_frag_encoder()
105 for (int m = 0; m < frag_size; m++) { in lorawan_frag_encoder()
106 out[m] ^= coded[j * frag_size + m]; in lorawan_frag_encoder()
Dfrag_encoder.h27 size_t coded_size, size_t frag_size, unsigned int redundant_frags);
/Zephyr-latest/subsys/lorawan/services/
Dfrag_decoder_lowmem.c176 void frag_dec_init(struct frag_decoder *decoder, size_t nb_frag, size_t frag_size) in frag_dec_init() argument
179 decoder->frag_size = frag_size; in frag_dec_init()
240 if (len != decoder->frag_size) { in frag_dec()
250 frag_flash_write((frag_counter - 1) * decoder->frag_size, (uint8_t *)buf, in frag_dec()
251 decoder->frag_size); in frag_dec()
267 memcpy(xor_row_data_buf, buf, decoder->frag_size); in frag_dec()
292 frag_flash_read(i * decoder->frag_size, row_data_buf, decoder->frag_size); in frag_dec()
295 decoder->frag_size); in frag_dec()
331 frag_flash_write(frame_index * decoder->frag_size, xor_row_data_buf, in frag_dec()
332 decoder->frag_size); in frag_dec()
[all …]
Dfrag_transport.c72 uint8_t frag_size; member
174 ctx.frag_size = rx_buf[rx_pos++]; in frag_transport_package_callback()
183 index, ctx.nb_frag, ctx.frag_size, ctx.padding, ctx.control, in frag_transport_package_callback()
198 if (ctx.nb_frag > FRAG_MAX_NB || ctx.frag_size > FRAG_MAX_SIZE) { in frag_transport_package_callback()
204 if (ctx.nb_frag * ctx.frag_size > FragDecoderGetMaxFileSize()) { in frag_transport_package_callback()
222 FragDecoderInit(ctx.nb_frag, ctx.frag_size, &ctx.decoder_callbacks); in frag_transport_package_callback()
227 frag_dec_init(&ctx.decoder, ctx.nb_frag, ctx.frag_size); in frag_transport_package_callback()
229 frag_flash_init(ctx.frag_size); in frag_transport_package_callback()
280 &ctx.decoder, frag_counter, &rx_buf[rx_pos], ctx.frag_size); in frag_transport_package_callback()
303 rx_pos += ctx.frag_size; in frag_transport_package_callback()
Dfrag_flash.c27 static uint32_t frag_size; variable
41 frag_size = fragment_size; in frag_flash_init()
70 if (size != frag_size) { in frag_flash_write()
119 LOG_DBG("Writing %u bytes to addr 0x%x", frag_size, frag_cache[i].addr); in frag_flash_finish()
120 flash_area_write(fa, frag_cache[i].addr, frag_cache[i].data, frag_size); in frag_flash_finish()
Dfrag_decoder_lowmem.h45 uint8_t frag_size; member
53 void frag_dec_init(struct frag_decoder *decoder, size_t nb_frag, size_t frag_size);
Dfrag_flash.h22 int frag_flash_init(uint32_t frag_size);
/Zephyr-latest/subsys/net/ip/
Dnet_pkt.c314 int count = 0, frag_size = 0; in net_pkt_print_frags() local
329 frag_size = net_buf_max_len(frag); in net_pkt_print_frags()
333 frag_size, net_buf_pool_get(frag->pool_id)); in net_pkt_print_frags()
341 total, count * frag_size, in net_pkt_print_frags()
342 count ? (total * 100) / (count * frag_size) : 0); in net_pkt_print_frags()