Lines Matching refs:val

76 uint8_t *net_buf_simple_add_u8(struct net_buf_simple *buf, uint8_t val)  in net_buf_simple_add_u8()  argument
80 NET_BUF_SIMPLE_DBG("buf %p val 0x%02x", buf, val); in net_buf_simple_add_u8()
83 *u8 = val; in net_buf_simple_add_u8()
88 void net_buf_simple_add_le16(struct net_buf_simple *buf, uint16_t val) in net_buf_simple_add_le16() argument
90 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_add_le16()
92 sys_put_le16(val, net_buf_simple_add(buf, sizeof(val))); in net_buf_simple_add_le16()
95 void net_buf_simple_add_be16(struct net_buf_simple *buf, uint16_t val) in net_buf_simple_add_be16() argument
97 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_add_be16()
99 sys_put_be16(val, net_buf_simple_add(buf, sizeof(val))); in net_buf_simple_add_be16()
102 void net_buf_simple_add_le24(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_add_le24() argument
104 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_add_le24()
106 sys_put_le24(val, net_buf_simple_add(buf, 3)); in net_buf_simple_add_le24()
109 void net_buf_simple_add_be24(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_add_be24() argument
111 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_add_be24()
113 sys_put_be24(val, net_buf_simple_add(buf, 3)); in net_buf_simple_add_be24()
116 void net_buf_simple_add_le32(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_add_le32() argument
118 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_add_le32()
120 sys_put_le32(val, net_buf_simple_add(buf, sizeof(val))); in net_buf_simple_add_le32()
123 void net_buf_simple_add_be32(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_add_be32() argument
125 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_add_be32()
127 sys_put_be32(val, net_buf_simple_add(buf, sizeof(val))); in net_buf_simple_add_be32()
130 void net_buf_simple_add_le40(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_add_le40() argument
132 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_add_le40()
134 sys_put_le40(val, net_buf_simple_add(buf, 5)); in net_buf_simple_add_le40()
137 void net_buf_simple_add_be40(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_add_be40() argument
139 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_add_be40()
141 sys_put_be40(val, net_buf_simple_add(buf, 5)); in net_buf_simple_add_be40()
144 void net_buf_simple_add_le48(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_add_le48() argument
146 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_add_le48()
148 sys_put_le48(val, net_buf_simple_add(buf, 6)); in net_buf_simple_add_le48()
151 void net_buf_simple_add_be48(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_add_be48() argument
153 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_add_be48()
155 sys_put_be48(val, net_buf_simple_add(buf, 6)); in net_buf_simple_add_be48()
158 void net_buf_simple_add_le64(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_add_le64() argument
160 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_add_le64()
162 sys_put_le64(val, net_buf_simple_add(buf, sizeof(val))); in net_buf_simple_add_le64()
165 void net_buf_simple_add_be64(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_add_be64() argument
167 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_add_be64()
169 sys_put_be64(val, net_buf_simple_add(buf, sizeof(val))); in net_buf_simple_add_be64()
184 uint8_t val; in net_buf_simple_remove_u8() local
187 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_u8()
188 val = *(uint8_t *)ptr; in net_buf_simple_remove_u8()
190 return val; in net_buf_simple_remove_u8()
195 uint16_t val; in net_buf_simple_remove_le16() local
198 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_le16()
199 val = UNALIGNED_GET((uint16_t *)ptr); in net_buf_simple_remove_le16()
201 return sys_le16_to_cpu(val); in net_buf_simple_remove_le16()
206 uint16_t val; in net_buf_simple_remove_be16() local
209 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_be16()
210 val = UNALIGNED_GET((uint16_t *)ptr); in net_buf_simple_remove_be16()
212 return sys_be16_to_cpu(val); in net_buf_simple_remove_be16()
219 } __packed val; in net_buf_simple_remove_le24() local
222 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_le24()
223 val = UNALIGNED_GET((struct uint24 *)ptr); in net_buf_simple_remove_le24()
225 return sys_le24_to_cpu(val.u24); in net_buf_simple_remove_le24()
232 } __packed val; in net_buf_simple_remove_be24() local
235 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_be24()
236 val = UNALIGNED_GET((struct uint24 *)ptr); in net_buf_simple_remove_be24()
238 return sys_be24_to_cpu(val.u24); in net_buf_simple_remove_be24()
243 uint32_t val; in net_buf_simple_remove_le32() local
246 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_le32()
247 val = UNALIGNED_GET((uint32_t *)ptr); in net_buf_simple_remove_le32()
249 return sys_le32_to_cpu(val); in net_buf_simple_remove_le32()
254 uint32_t val; in net_buf_simple_remove_be32() local
257 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_be32()
258 val = UNALIGNED_GET((uint32_t *)ptr); in net_buf_simple_remove_be32()
260 return sys_be32_to_cpu(val); in net_buf_simple_remove_be32()
267 } __packed val; in net_buf_simple_remove_le40() local
270 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_le40()
271 val = UNALIGNED_GET((struct uint40 *)ptr); in net_buf_simple_remove_le40()
273 return sys_le40_to_cpu(val.u40); in net_buf_simple_remove_le40()
280 } __packed val; in net_buf_simple_remove_be40() local
283 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_be40()
284 val = UNALIGNED_GET((struct uint40 *)ptr); in net_buf_simple_remove_be40()
286 return sys_be40_to_cpu(val.u40); in net_buf_simple_remove_be40()
293 } __packed val; in net_buf_simple_remove_le48() local
296 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_le48()
297 val = UNALIGNED_GET((struct uint48 *)ptr); in net_buf_simple_remove_le48()
299 return sys_le48_to_cpu(val.u48); in net_buf_simple_remove_le48()
306 } __packed val; in net_buf_simple_remove_be48() local
309 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_be48()
310 val = UNALIGNED_GET((struct uint48 *)ptr); in net_buf_simple_remove_be48()
312 return sys_be48_to_cpu(val.u48); in net_buf_simple_remove_be48()
317 uint64_t val; in net_buf_simple_remove_le64() local
320 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_le64()
321 val = UNALIGNED_GET((uint64_t *)ptr); in net_buf_simple_remove_le64()
323 return sys_le64_to_cpu(val); in net_buf_simple_remove_le64()
328 uint64_t val; in net_buf_simple_remove_be64() local
331 ptr = net_buf_simple_remove_mem(buf, sizeof(val)); in net_buf_simple_remove_be64()
332 val = UNALIGNED_GET((uint64_t *)ptr); in net_buf_simple_remove_be64()
334 return sys_be64_to_cpu(val); in net_buf_simple_remove_be64()
356 void net_buf_simple_push_le16(struct net_buf_simple *buf, uint16_t val) in net_buf_simple_push_le16() argument
358 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_push_le16()
360 sys_put_le16(val, net_buf_simple_push(buf, sizeof(val))); in net_buf_simple_push_le16()
363 void net_buf_simple_push_be16(struct net_buf_simple *buf, uint16_t val) in net_buf_simple_push_be16() argument
365 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_push_be16()
367 sys_put_be16(val, net_buf_simple_push(buf, sizeof(val))); in net_buf_simple_push_be16()
370 void net_buf_simple_push_u8(struct net_buf_simple *buf, uint8_t val) in net_buf_simple_push_u8() argument
374 *data = val; in net_buf_simple_push_u8()
377 void net_buf_simple_push_le24(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_push_le24() argument
379 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_push_le24()
381 sys_put_le24(val, net_buf_simple_push(buf, 3)); in net_buf_simple_push_le24()
384 void net_buf_simple_push_be24(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_push_be24() argument
386 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_push_be24()
388 sys_put_be24(val, net_buf_simple_push(buf, 3)); in net_buf_simple_push_be24()
391 void net_buf_simple_push_le32(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_push_le32() argument
393 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_push_le32()
395 sys_put_le32(val, net_buf_simple_push(buf, sizeof(val))); in net_buf_simple_push_le32()
398 void net_buf_simple_push_be32(struct net_buf_simple *buf, uint32_t val) in net_buf_simple_push_be32() argument
400 NET_BUF_SIMPLE_DBG("buf %p val %u", buf, val); in net_buf_simple_push_be32()
402 sys_put_be32(val, net_buf_simple_push(buf, sizeof(val))); in net_buf_simple_push_be32()
405 void net_buf_simple_push_le40(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_push_le40() argument
407 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_push_le40()
409 sys_put_le40(val, net_buf_simple_push(buf, 5)); in net_buf_simple_push_le40()
412 void net_buf_simple_push_be40(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_push_be40() argument
414 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_push_be40()
416 sys_put_be40(val, net_buf_simple_push(buf, 5)); in net_buf_simple_push_be40()
419 void net_buf_simple_push_le48(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_push_le48() argument
421 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_push_le48()
423 sys_put_le48(val, net_buf_simple_push(buf, 6)); in net_buf_simple_push_le48()
426 void net_buf_simple_push_be48(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_push_be48() argument
428 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_push_be48()
430 sys_put_be48(val, net_buf_simple_push(buf, 6)); in net_buf_simple_push_be48()
433 void net_buf_simple_push_le64(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_push_le64() argument
435 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_push_le64()
437 sys_put_le64(val, net_buf_simple_push(buf, sizeof(val))); in net_buf_simple_push_le64()
440 void net_buf_simple_push_be64(struct net_buf_simple *buf, uint64_t val) in net_buf_simple_push_be64() argument
442 NET_BUF_SIMPLE_DBG("buf %p val %" PRIu64, buf, val); in net_buf_simple_push_be64()
444 sys_put_be64(val, net_buf_simple_push(buf, sizeof(val))); in net_buf_simple_push_be64()
473 uint8_t val; in net_buf_simple_pull_u8() local
475 val = buf->data[0]; in net_buf_simple_pull_u8()
478 return val; in net_buf_simple_pull_u8()
483 uint16_t val; in net_buf_simple_pull_le16() local
485 val = UNALIGNED_GET((uint16_t *)buf->data); in net_buf_simple_pull_le16()
486 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_le16()
488 return sys_le16_to_cpu(val); in net_buf_simple_pull_le16()
493 uint16_t val; in net_buf_simple_pull_be16() local
495 val = UNALIGNED_GET((uint16_t *)buf->data); in net_buf_simple_pull_be16()
496 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_be16()
498 return sys_be16_to_cpu(val); in net_buf_simple_pull_be16()
505 } __packed val; in net_buf_simple_pull_le24() local
507 val = UNALIGNED_GET((struct uint24 *)buf->data); in net_buf_simple_pull_le24()
508 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_le24()
510 return sys_le24_to_cpu(val.u24); in net_buf_simple_pull_le24()
517 } __packed val; in net_buf_simple_pull_be24() local
519 val = UNALIGNED_GET((struct uint24 *)buf->data); in net_buf_simple_pull_be24()
520 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_be24()
522 return sys_be24_to_cpu(val.u24); in net_buf_simple_pull_be24()
527 uint32_t val; in net_buf_simple_pull_le32() local
529 val = UNALIGNED_GET((uint32_t *)buf->data); in net_buf_simple_pull_le32()
530 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_le32()
532 return sys_le32_to_cpu(val); in net_buf_simple_pull_le32()
537 uint32_t val; in net_buf_simple_pull_be32() local
539 val = UNALIGNED_GET((uint32_t *)buf->data); in net_buf_simple_pull_be32()
540 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_be32()
542 return sys_be32_to_cpu(val); in net_buf_simple_pull_be32()
549 } __packed val; in net_buf_simple_pull_le40() local
551 val = UNALIGNED_GET((struct uint40 *)buf->data); in net_buf_simple_pull_le40()
552 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_le40()
554 return sys_le40_to_cpu(val.u40); in net_buf_simple_pull_le40()
561 } __packed val; in net_buf_simple_pull_be40() local
563 val = UNALIGNED_GET((struct uint40 *)buf->data); in net_buf_simple_pull_be40()
564 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_be40()
566 return sys_be40_to_cpu(val.u40); in net_buf_simple_pull_be40()
573 } __packed val; in net_buf_simple_pull_le48() local
575 val = UNALIGNED_GET((struct uint48 *)buf->data); in net_buf_simple_pull_le48()
576 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_le48()
578 return sys_le48_to_cpu(val.u48); in net_buf_simple_pull_le48()
585 } __packed val; in net_buf_simple_pull_be48() local
587 val = UNALIGNED_GET((struct uint48 *)buf->data); in net_buf_simple_pull_be48()
588 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_be48()
590 return sys_be48_to_cpu(val.u48); in net_buf_simple_pull_be48()
595 uint64_t val; in net_buf_simple_pull_le64() local
597 val = UNALIGNED_GET((uint64_t *)buf->data); in net_buf_simple_pull_le64()
598 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_le64()
600 return sys_le64_to_cpu(val); in net_buf_simple_pull_le64()
605 uint64_t val; in net_buf_simple_pull_be64() local
607 val = UNALIGNED_GET((uint64_t *)buf->data); in net_buf_simple_pull_be64()
608 net_buf_simple_pull(buf, sizeof(val)); in net_buf_simple_pull_be64()
610 return sys_be64_to_cpu(val); in net_buf_simple_pull_be64()