Lines Matching +full:little +full:- +full:endian
8 * SPDX-License-Identifier: Apache-2.0
84 * The main use of this is for scenarios where the meta-data of the normal
123 * @return Pointer to stack-allocated net_buf_simple object.
145 if (!buf->__buf) { in net_buf_simple_init()
146 buf->__buf = (uint8_t *)buf + sizeof(*buf); in net_buf_simple_init()
149 buf->data = buf->__buf + reserve_head; in net_buf_simple_init()
150 buf->len = 0U; in net_buf_simple_init()
174 buf->len = 0U; in net_buf_simple_reset()
175 buf->data = buf->__buf; in net_buf_simple_reset()
220 * @brief Add (8-bit) byte at the end of the buffer
233 * @brief Add 16-bit value at the end of the buffer
235 * Adds 16-bit value in little endian format at the end of buffer.
240 * @param val 16-bit value to be added.
245 * @brief Add 16-bit value at the end of the buffer
247 * Adds 16-bit value in big endian format at the end of buffer.
252 * @param val 16-bit value to be added.
257 * @brief Add 24-bit value at the end of the buffer
259 * Adds 24-bit value in little endian format at the end of buffer.
264 * @param val 24-bit value to be added.
269 * @brief Add 24-bit value at the end of the buffer
271 * Adds 24-bit value in big endian format at the end of buffer.
276 * @param val 24-bit value to be added.
281 * @brief Add 32-bit value at the end of the buffer
283 * Adds 32-bit value in little endian format at the end of buffer.
288 * @param val 32-bit value to be added.
293 * @brief Add 32-bit value at the end of the buffer
295 * Adds 32-bit value in big endian format at the end of buffer.
300 * @param val 32-bit value to be added.
305 * @brief Add 40-bit value at the end of the buffer
307 * Adds 40-bit value in little endian format at the end of buffer.
312 * @param val 40-bit value to be added.
317 * @brief Add 40-bit value at the end of the buffer
319 * Adds 40-bit value in big endian format at the end of buffer.
324 * @param val 40-bit value to be added.
329 * @brief Add 48-bit value at the end of the buffer
331 * Adds 48-bit value in little endian format at the end of buffer.
336 * @param val 48-bit value to be added.
341 * @brief Add 48-bit value at the end of the buffer
343 * Adds 48-bit value in big endian format at the end of buffer.
348 * @param val 48-bit value to be added.
353 * @brief Add 64-bit value at the end of the buffer
355 * Adds 64-bit value in little endian format at the end of buffer.
360 * @param val 64-bit value to be added.
365 * @brief Add 64-bit value at the end of the buffer
367 * Adds 64-bit value in big endian format at the end of buffer.
372 * @param val 64-bit value to be added.
389 * @brief Remove a 8-bit value from the end of the buffer
392 * on 8-bit values.
396 * @return The 8-bit removed value
404 * on 16-bit little endian data.
408 * @return 16-bit value converted from little endian to host endian.
416 * on 16-bit big endian data.
420 * @return 16-bit value converted from big endian to host endian.
428 * on 24-bit little endian data.
432 * @return 24-bit value converted from little endian to host endian.
440 * on 24-bit big endian data.
444 * @return 24-bit value converted from big endian to host endian.
452 * on 32-bit little endian data.
456 * @return 32-bit value converted from little endian to host endian.
464 * on 32-bit big endian data.
468 * @return 32-bit value converted from big endian to host endian.
476 * on 40-bit little endian data.
480 * @return 40-bit value converted from little endian to host endian.
488 * on 40-bit big endian data.
492 * @return 40-bit value converted from big endian to host endian.
500 * on 48-bit little endian data.
504 * @return 48-bit value converted from little endian to host endian.
512 * on 48-bit big endian data.
516 * @return 48-bit value converted from big endian to host endian.
524 * on 64-bit little endian data.
528 * @return 64-bit value converted from little endian to host endian.
536 * on 64-bit big endian data.
540 * @return 64-bit value converted from big endian to host endian.
573 * @brief Push 16-bit value to the beginning of the buffer
575 * Adds 16-bit value in little endian format to the beginning of the
579 * @param val 16-bit value to be pushed to the buffer.
584 * @brief Push 16-bit value to the beginning of the buffer
586 * Adds 16-bit value in big endian format to the beginning of the
590 * @param val 16-bit value to be pushed to the buffer.
595 * @brief Push 8-bit value to the beginning of the buffer
597 * Adds 8-bit value the beginning of the buffer.
600 * @param val 8-bit value to be pushed to the buffer.
605 * @brief Push 24-bit value to the beginning of the buffer
607 * Adds 24-bit value in little endian format to the beginning of the
611 * @param val 24-bit value to be pushed to the buffer.
616 * @brief Push 24-bit value to the beginning of the buffer
618 * Adds 24-bit value in big endian format to the beginning of the
622 * @param val 24-bit value to be pushed to the buffer.
627 * @brief Push 32-bit value to the beginning of the buffer
629 * Adds 32-bit value in little endian format to the beginning of the
633 * @param val 32-bit value to be pushed to the buffer.
638 * @brief Push 32-bit value to the beginning of the buffer
640 * Adds 32-bit value in big endian format to the beginning of the
644 * @param val 32-bit value to be pushed to the buffer.
649 * @brief Push 40-bit value to the beginning of the buffer
651 * Adds 40-bit value in little endian format to the beginning of the
655 * @param val 40-bit value to be pushed to the buffer.
660 * @brief Push 40-bit value to the beginning of the buffer
662 * Adds 40-bit value in big endian format to the beginning of the
666 * @param val 40-bit value to be pushed to the buffer.
671 * @brief Push 48-bit value to the beginning of the buffer
673 * Adds 48-bit value in little endian format to the beginning of the
677 * @param val 48-bit value to be pushed to the buffer.
682 * @brief Push 48-bit value to the beginning of the buffer
684 * Adds 48-bit value in big endian format to the beginning of the
688 * @param val 48-bit value to be pushed to the buffer.
693 * @brief Push 64-bit value to the beginning of the buffer
695 * Adds 64-bit value in little endian format to the beginning of the
699 * @param val 64-bit value to be pushed to the buffer.
704 * @brief Push 64-bit value to the beginning of the buffer
706 * Adds 64-bit value in big endian format to the beginning of the
710 * @param val 64-bit value to be pushed to the buffer.
741 * @brief Remove a 8-bit value from the beginning of the buffer
744 * on 8-bit values.
748 * @return The 8-bit removed value
756 * on 16-bit little endian data.
760 * @return 16-bit value converted from little endian to host endian.
768 * on 16-bit big endian data.
772 * @return 16-bit value converted from big endian to host endian.
780 * on 24-bit little endian data.
784 * @return 24-bit value converted from little endian to host endian.
792 * on 24-bit big endian data.
796 * @return 24-bit value converted from big endian to host endian.
804 * on 32-bit little endian data.
808 * @return 32-bit value converted from little endian to host endian.
816 * on 32-bit big endian data.
820 * @return 32-bit value converted from big endian to host endian.
828 * on 40-bit little endian data.
832 * @return 40-bit value converted from little endian to host endian.
840 * on 40-bit big endian data.
844 * @return 40-bit value converted from big endian to host endian.
852 * on 48-bit little endian data.
856 * @return 48-bit value converted from little endian to host endian.
864 * on 48-bit big endian data.
868 * @return 48-bit value converted from big endian to host endian.
876 * on 64-bit little endian data.
880 * @return 64-bit value converted from little endian to host endian.
888 * on 64-bit big endian data.
892 * @return 64-bit value converted from big endian to host endian.
907 return buf->data + buf->len; in net_buf_simple_tail()
968 state->offset = (uint16_t)net_buf_simple_headroom(buf); in net_buf_simple_save()
969 state->len = buf->len; in net_buf_simple_save()
984 buf->data = buf->__buf + state->offset; in net_buf_simple_restore()
985 buf->len = state->len; in net_buf_simple_restore()
1016 /** Bit-field of buffer flags. */
1195 * @brief Define a new pool for buffers based on fixed-size data
1305 * @param id Pool ID (e.g. from buf->pool_id).
1312 * @brief Get a zero-based index for a buffer.
1314 * This function will translate a buffer into a zero-based index,
1316 * want to associate an external array of meta-data contexts with the
1321 * @return Zero-based index for the buffer.
1471 struct net_buf_pool *pool = net_buf_pool_get(buf->pool_id); in net_buf_destroy()
1473 if (buf->__buf) { in net_buf_destroy()
1474 if (!(buf->flags & NET_BUF_EXTERNAL_DATA)) { in net_buf_destroy()
1475 pool->alloc->cb->unref(buf, buf->__buf); in net_buf_destroy()
1477 buf->__buf = NULL; in net_buf_destroy()
1480 k_lifo_put(&pool->free, buf); in net_buf_destroy()
1578 return (void *)buf->user_data; in net_buf_user_data()
1602 net_buf_simple_reserve(&buf->b, reserve); in net_buf_reserve()
1618 return net_buf_simple_add(&buf->b, len); in net_buf_add()
1636 return net_buf_simple_add_mem(&buf->b, mem, len); in net_buf_add_mem()
1640 * @brief Add (8-bit) byte at the end of the buffer
1652 return net_buf_simple_add_u8(&buf->b, val); in net_buf_add_u8()
1656 * @brief Add 16-bit value at the end of the buffer
1658 * Adds 16-bit value in little endian format at the end of buffer.
1663 * @param val 16-bit value to be added.
1667 net_buf_simple_add_le16(&buf->b, val); in net_buf_add_le16()
1671 * @brief Add 16-bit value at the end of the buffer
1673 * Adds 16-bit value in big endian format at the end of buffer.
1678 * @param val 16-bit value to be added.
1682 net_buf_simple_add_be16(&buf->b, val); in net_buf_add_be16()
1686 * @brief Add 24-bit value at the end of the buffer
1688 * Adds 24-bit value in little endian format at the end of buffer.
1693 * @param val 24-bit value to be added.
1697 net_buf_simple_add_le24(&buf->b, val); in net_buf_add_le24()
1701 * @brief Add 24-bit value at the end of the buffer
1703 * Adds 24-bit value in big endian format at the end of buffer.
1708 * @param val 24-bit value to be added.
1712 net_buf_simple_add_be24(&buf->b, val); in net_buf_add_be24()
1716 * @brief Add 32-bit value at the end of the buffer
1718 * Adds 32-bit value in little endian format at the end of buffer.
1723 * @param val 32-bit value to be added.
1727 net_buf_simple_add_le32(&buf->b, val); in net_buf_add_le32()
1731 * @brief Add 32-bit value at the end of the buffer
1733 * Adds 32-bit value in big endian format at the end of buffer.
1738 * @param val 32-bit value to be added.
1742 net_buf_simple_add_be32(&buf->b, val); in net_buf_add_be32()
1746 * @brief Add 40-bit value at the end of the buffer
1748 * Adds 40-bit value in little endian format at the end of buffer.
1753 * @param val 40-bit value to be added.
1757 net_buf_simple_add_le40(&buf->b, val); in net_buf_add_le40()
1761 * @brief Add 40-bit value at the end of the buffer
1763 * Adds 40-bit value in big endian format at the end of buffer.
1768 * @param val 40-bit value to be added.
1772 net_buf_simple_add_be40(&buf->b, val); in net_buf_add_be40()
1776 * @brief Add 48-bit value at the end of the buffer
1778 * Adds 48-bit value in little endian format at the end of buffer.
1783 * @param val 48-bit value to be added.
1787 net_buf_simple_add_le48(&buf->b, val); in net_buf_add_le48()
1791 * @brief Add 48-bit value at the end of the buffer
1793 * Adds 48-bit value in big endian format at the end of buffer.
1798 * @param val 48-bit value to be added.
1802 net_buf_simple_add_be48(&buf->b, val); in net_buf_add_be48()
1806 * @brief Add 64-bit value at the end of the buffer
1808 * Adds 64-bit value in little endian format at the end of buffer.
1813 * @param val 64-bit value to be added.
1817 net_buf_simple_add_le64(&buf->b, val); in net_buf_add_le64()
1821 * @brief Add 64-bit value at the end of the buffer
1823 * Adds 64-bit value in big endian format at the end of buffer.
1828 * @param val 64-bit value to be added.
1832 net_buf_simple_add_be64(&buf->b, val); in net_buf_add_be64()
1847 return net_buf_simple_remove_mem(&buf->b, len); in net_buf_remove_mem()
1851 * @brief Remove a 8-bit value from the end of the buffer
1854 * 8-bit values.
1858 * @return The 8-bit removed value
1862 return net_buf_simple_remove_u8(&buf->b); in net_buf_remove_u8()
1869 * 16-bit little endian data.
1873 * @return 16-bit value converted from little endian to host endian.
1877 return net_buf_simple_remove_le16(&buf->b); in net_buf_remove_le16()
1884 * 16-bit big endian data.
1888 * @return 16-bit value converted from big endian to host endian.
1892 return net_buf_simple_remove_be16(&buf->b); in net_buf_remove_be16()
1899 * 24-bit big endian data.
1903 * @return 24-bit value converted from big endian to host endian.
1907 return net_buf_simple_remove_be24(&buf->b); in net_buf_remove_be24()
1914 * 24-bit little endian data.
1918 * @return 24-bit value converted from little endian to host endian.
1922 return net_buf_simple_remove_le24(&buf->b); in net_buf_remove_le24()
1929 * 32-bit little endian data.
1933 * @return 32-bit value converted from little endian to host endian.
1937 return net_buf_simple_remove_le32(&buf->b); in net_buf_remove_le32()
1944 * 32-bit big endian data.
1948 * @return 32-bit value converted from big endian to host endian.
1952 return net_buf_simple_remove_be32(&buf->b); in net_buf_remove_be32()
1959 * 40-bit little endian data.
1963 * @return 40-bit value converted from little endian to host endian.
1967 return net_buf_simple_remove_le40(&buf->b); in net_buf_remove_le40()
1974 * 40-bit big endian data.
1978 * @return 40-bit value converted from big endian to host endian.
1982 return net_buf_simple_remove_be40(&buf->b); in net_buf_remove_be40()
1989 * 48-bit little endian data.
1993 * @return 48-bit value converted from little endian to host endian.
1997 return net_buf_simple_remove_le48(&buf->b); in net_buf_remove_le48()
2004 * 48-bit big endian data.
2008 * @return 48-bit value converted from big endian to host endian.
2012 return net_buf_simple_remove_be48(&buf->b); in net_buf_remove_be48()
2019 * 64-bit little endian data.
2023 * @return 64-bit value converted from little endian to host endian.
2027 return net_buf_simple_remove_le64(&buf->b); in net_buf_remove_le64()
2034 * 64-bit big endian data.
2038 * @return 64-bit value converted from big endian to host endian.
2042 return net_buf_simple_remove_be64(&buf->b); in net_buf_remove_be64()
2058 return net_buf_simple_push(&buf->b, len); in net_buf_push()
2076 return net_buf_simple_push_mem(&buf->b, mem, len); in net_buf_push_mem()
2080 * @brief Push 8-bit value to the beginning of the buffer
2082 * Adds 8-bit value the beginning of the buffer.
2085 * @param val 8-bit value to be pushed to the buffer.
2089 net_buf_simple_push_u8(&buf->b, val); in net_buf_push_u8()
2093 * @brief Push 16-bit value to the beginning of the buffer
2095 * Adds 16-bit value in little endian format to the beginning of the
2099 * @param val 16-bit value to be pushed to the buffer.
2103 net_buf_simple_push_le16(&buf->b, val); in net_buf_push_le16()
2107 * @brief Push 16-bit value to the beginning of the buffer
2109 * Adds 16-bit value in big endian format to the beginning of the
2113 * @param val 16-bit value to be pushed to the buffer.
2117 net_buf_simple_push_be16(&buf->b, val); in net_buf_push_be16()
2121 * @brief Push 24-bit value to the beginning of the buffer
2123 * Adds 24-bit value in little endian format to the beginning of the
2127 * @param val 24-bit value to be pushed to the buffer.
2131 net_buf_simple_push_le24(&buf->b, val); in net_buf_push_le24()
2135 * @brief Push 24-bit value to the beginning of the buffer
2137 * Adds 24-bit value in big endian format to the beginning of the
2141 * @param val 24-bit value to be pushed to the buffer.
2145 net_buf_simple_push_be24(&buf->b, val); in net_buf_push_be24()
2149 * @brief Push 32-bit value to the beginning of the buffer
2151 * Adds 32-bit value in little endian format to the beginning of the
2155 * @param val 32-bit value to be pushed to the buffer.
2159 net_buf_simple_push_le32(&buf->b, val); in net_buf_push_le32()
2163 * @brief Push 32-bit value to the beginning of the buffer
2165 * Adds 32-bit value in big endian format to the beginning of the
2169 * @param val 32-bit value to be pushed to the buffer.
2173 net_buf_simple_push_be32(&buf->b, val); in net_buf_push_be32()
2177 * @brief Push 40-bit value to the beginning of the buffer
2179 * Adds 40-bit value in little endian format to the beginning of the
2183 * @param val 40-bit value to be pushed to the buffer.
2187 net_buf_simple_push_le40(&buf->b, val); in net_buf_push_le40()
2191 * @brief Push 40-bit value to the beginning of the buffer
2193 * Adds 40-bit value in big endian format to the beginning of the
2197 * @param val 40-bit value to be pushed to the buffer.
2201 net_buf_simple_push_be40(&buf->b, val); in net_buf_push_be40()
2205 * @brief Push 48-bit value to the beginning of the buffer
2207 * Adds 48-bit value in little endian format to the beginning of the
2211 * @param val 48-bit value to be pushed to the buffer.
2215 net_buf_simple_push_le48(&buf->b, val); in net_buf_push_le48()
2219 * @brief Push 48-bit value to the beginning of the buffer
2221 * Adds 48-bit value in big endian format to the beginning of the
2225 * @param val 48-bit value to be pushed to the buffer.
2229 net_buf_simple_push_be48(&buf->b, val); in net_buf_push_be48()
2233 * @brief Push 64-bit value to the beginning of the buffer
2235 * Adds 64-bit value in little endian format to the beginning of the
2239 * @param val 64-bit value to be pushed to the buffer.
2243 net_buf_simple_push_le64(&buf->b, val); in net_buf_push_le64()
2247 * @brief Push 64-bit value to the beginning of the buffer
2249 * Adds 64-bit value in big endian format to the beginning of the
2253 * @param val 64-bit value to be pushed to the buffer.
2257 net_buf_simple_push_be64(&buf->b, val); in net_buf_push_be64()
2273 return net_buf_simple_pull(&buf->b, len); in net_buf_pull()
2289 return net_buf_simple_pull_mem(&buf->b, len); in net_buf_pull_mem()
2293 * @brief Remove a 8-bit value from the beginning of the buffer
2296 * 8-bit values.
2300 * @return The 8-bit removed value
2304 return net_buf_simple_pull_u8(&buf->b); in net_buf_pull_u8()
2311 * 16-bit little endian data.
2315 * @return 16-bit value converted from little endian to host endian.
2319 return net_buf_simple_pull_le16(&buf->b); in net_buf_pull_le16()
2326 * 16-bit big endian data.
2330 * @return 16-bit value converted from big endian to host endian.
2334 return net_buf_simple_pull_be16(&buf->b); in net_buf_pull_be16()
2341 * 24-bit little endian data.
2345 * @return 24-bit value converted from little endian to host endian.
2349 return net_buf_simple_pull_le24(&buf->b); in net_buf_pull_le24()
2356 * 24-bit big endian data.
2360 * @return 24-bit value converted from big endian to host endian.
2364 return net_buf_simple_pull_be24(&buf->b); in net_buf_pull_be24()
2371 * 32-bit little endian data.
2375 * @return 32-bit value converted from little endian to host endian.
2379 return net_buf_simple_pull_le32(&buf->b); in net_buf_pull_le32()
2386 * 32-bit big endian data.
2390 * @return 32-bit value converted from big endian to host endian.
2394 return net_buf_simple_pull_be32(&buf->b); in net_buf_pull_be32()
2401 * 40-bit little endian data.
2405 * @return 40-bit value converted from little endian to host endian.
2409 return net_buf_simple_pull_le40(&buf->b); in net_buf_pull_le40()
2416 * 40-bit big endian data.
2420 * @return 40-bit value converted from big endian to host endian.
2424 return net_buf_simple_pull_be40(&buf->b); in net_buf_pull_be40()
2431 * 48-bit little endian data.
2435 * @return 48-bit value converted from little endian to host endian.
2439 return net_buf_simple_pull_le48(&buf->b); in net_buf_pull_le48()
2446 * 48-bit big endian data.
2450 * @return 48-bit value converted from big endian to host endian.
2454 return net_buf_simple_pull_be48(&buf->b); in net_buf_pull_be48()
2461 * 64-bit little endian data.
2465 * @return 64-bit value converted from little endian to host endian.
2469 return net_buf_simple_pull_le64(&buf->b); in net_buf_pull_le64()
2476 * 64-bit big endian data.
2480 * @return 64-bit value converted from big endian to host endian.
2484 return net_buf_simple_pull_be64(&buf->b); in net_buf_pull_be64()
2498 return net_buf_simple_tailroom(&buf->b); in net_buf_tailroom()
2512 return net_buf_simple_headroom(&buf->b); in net_buf_headroom()
2526 return net_buf_simple_max_len(&buf->b); in net_buf_max_len()
2540 return net_buf_simple_tail(&buf->b); in net_buf_tail()
2575 * was non-NULL) or frag (if head was NULL).
2691 while (buf && len--) { in net_buf_skip()
2693 if (!buf->len) { in net_buf_skip()
2716 bytes += buf->len; in net_buf_frags_len()
2717 buf = buf->frags; in net_buf_frags_len()