Lines Matching refs:data
46 /* IAR recommend this technique for accessing unaligned data in
47 * https://www.iar.com/knowledge/support/technical-notes/compiler/accessing-unaligned-data
107 * \param p pointer to 2 bytes of data
116 * \param p pointer to 2 bytes of data
117 * \param x data to write
125 * \param p pointer to 4 bytes of data
134 * \param p pointer to 4 bytes of data
135 * \param x data to write
143 * \param p pointer to 8 bytes of data
152 * \param p pointer to 8 bytes of data
153 * \param x data to write
304 * \param data Base address of the memory to get the four bytes from.
305 * \param offset Offset from \p data of the first and most significant
309 #define MBEDTLS_GET_UINT32_BE(data, offset) \
311 ? mbedtls_get_unaligned_uint32((data) + (offset)) \
312 : MBEDTLS_BSWAP32(mbedtls_get_unaligned_uint32((data) + (offset))) \
319 * \param data Base address of the memory where to put the 32
321 * \param offset Offset from \p data where to put the most significant
324 #define MBEDTLS_PUT_UINT32_BE(n, data, offset) \
328 mbedtls_put_unaligned_uint32((data) + (offset), (uint32_t) (n)); \
332 mbedtls_put_unaligned_uint32((data) + (offset), MBEDTLS_BSWAP32((uint32_t) (n))); \
340 * \param data Base address of the memory to get the four bytes from.
341 * \param offset Offset from \p data of the first and least significant
345 #define MBEDTLS_GET_UINT32_LE(data, offset) \
347 ? MBEDTLS_BSWAP32(mbedtls_get_unaligned_uint32((data) + (offset))) \
348 : mbedtls_get_unaligned_uint32((data) + (offset)) \
356 * \param data Base address of the memory where to put the 32
358 * \param offset Offset from \p data where to put the least significant
361 #define MBEDTLS_PUT_UINT32_LE(n, data, offset) \
365 mbedtls_put_unaligned_uint32((data) + (offset), MBEDTLS_BSWAP32((uint32_t) (n))); \
369 mbedtls_put_unaligned_uint32((data) + (offset), ((uint32_t) (n))); \
377 * \param data Base address of the memory to get the two bytes from.
378 * \param offset Offset from \p data of the first and least significant
382 #define MBEDTLS_GET_UINT16_LE(data, offset) \
384 ? MBEDTLS_BSWAP16(mbedtls_get_unaligned_uint16((data) + (offset))) \
385 : mbedtls_get_unaligned_uint16((data) + (offset)) \
392 * \param data Base address of the memory where to put the 16
394 * \param offset Offset from \p data where to put the least significant
397 #define MBEDTLS_PUT_UINT16_LE(n, data, offset) \
401 mbedtls_put_unaligned_uint16((data) + (offset), MBEDTLS_BSWAP16((uint16_t) (n))); \
405 mbedtls_put_unaligned_uint16((data) + (offset), (uint16_t) (n)); \
413 * \param data Base address of the memory to get the two bytes from.
414 * \param offset Offset from \p data of the first and most significant
418 #define MBEDTLS_GET_UINT16_BE(data, offset) \
420 ? mbedtls_get_unaligned_uint16((data) + (offset)) \
421 : MBEDTLS_BSWAP16(mbedtls_get_unaligned_uint16((data) + (offset))) \
428 * \param data Base address of the memory where to put the 16
430 * \param offset Offset from \p data where to put the most significant
433 #define MBEDTLS_PUT_UINT16_BE(n, data, offset) \
437 mbedtls_put_unaligned_uint16((data) + (offset), (uint16_t) (n)); \
441 mbedtls_put_unaligned_uint16((data) + (offset), MBEDTLS_BSWAP16((uint16_t) (n))); \
449 * \param data Base address of the memory to get the three bytes from.
450 * \param offset Offset from \p data of the first and most significant
454 #define MBEDTLS_GET_UINT24_BE(data, offset) \
456 ((uint32_t) (data)[(offset)] << 16) \
457 | ((uint32_t) (data)[(offset) + 1] << 8) \
458 | ((uint32_t) (data)[(offset) + 2]) \
465 * \param data Base address of the memory where to put the 24
467 * \param offset Offset from \p data where to put the most significant
470 #define MBEDTLS_PUT_UINT24_BE(n, data, offset) \
472 (data)[(offset)] = MBEDTLS_BYTE_2(n); \
473 (data)[(offset) + 1] = MBEDTLS_BYTE_1(n); \
474 (data)[(offset) + 2] = MBEDTLS_BYTE_0(n); \
481 * \param data Base address of the memory to get the three bytes from.
482 * \param offset Offset from \p data of the first and least significant
486 #define MBEDTLS_GET_UINT24_LE(data, offset) \
488 ((uint32_t) (data)[(offset)]) \
489 | ((uint32_t) (data)[(offset) + 1] << 8) \
490 | ((uint32_t) (data)[(offset) + 2] << 16) \
497 * \param data Base address of the memory where to put the 24
499 * \param offset Offset from \p data where to put the least significant
502 #define MBEDTLS_PUT_UINT24_LE(n, data, offset) \
504 (data)[(offset)] = MBEDTLS_BYTE_0(n); \
505 (data)[(offset) + 1] = MBEDTLS_BYTE_1(n); \
506 (data)[(offset) + 2] = MBEDTLS_BYTE_2(n); \
513 * \param data Base address of the memory to get the eight bytes from.
514 * \param offset Offset from \p data of the first and most significant
518 #define MBEDTLS_GET_UINT64_BE(data, offset) \
520 ? mbedtls_get_unaligned_uint64((data) + (offset)) \
521 : MBEDTLS_BSWAP64(mbedtls_get_unaligned_uint64((data) + (offset))) \
528 * \param data Base address of the memory where to put the 64
530 * \param offset Offset from \p data where to put the most significant
533 #define MBEDTLS_PUT_UINT64_BE(n, data, offset) \
537 mbedtls_put_unaligned_uint64((data) + (offset), (uint64_t) (n)); \
541 mbedtls_put_unaligned_uint64((data) + (offset), MBEDTLS_BSWAP64((uint64_t) (n))); \
549 * \param data Base address of the memory to get the eight bytes from.
550 * \param offset Offset from \p data of the first and least significant
554 #define MBEDTLS_GET_UINT64_LE(data, offset) \
556 ? MBEDTLS_BSWAP64(mbedtls_get_unaligned_uint64((data) + (offset))) \
557 : mbedtls_get_unaligned_uint64((data) + (offset)) \
564 * \param data Base address of the memory where to put the 64
566 * \param offset Offset from \p data where to put the least significant
569 #define MBEDTLS_PUT_UINT64_LE(n, data, offset) \
573 mbedtls_put_unaligned_uint64((data) + (offset), MBEDTLS_BSWAP64((uint64_t) (n))); \
577 mbedtls_put_unaligned_uint64((data) + (offset), (uint64_t) (n)); \