1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Improve documentation and add more uses of MBEDTLS_PUT

minor changes, such as improving the documentation for the byte reading
macros, and using MBEDTLS_PUT_UINT16_xy in place of byte reading
macro combinations

Signed-off-by: Joe Subbiani <joe.subbiani@arm.com>
This commit is contained in:
Joe Subbiani
2021-07-21 15:22:47 +01:00
parent 896f4eeaf7
commit d3a3f21ad5
4 changed files with 5 additions and 8 deletions

View File

@ -61,9 +61,8 @@
/** Byte Reading Macros
*
* Obtain the most significant byte of x using 0xff
* Using MBEDTLS_BYTE_a will shift a*8 bits
* to retrieve the next byte of information
* Given a multi-byte integer \p x, MBEDTLS_BYTE_n retrieves the n-th
* byte from x, where byte 0 is the least significant byte.
*/
#define MBEDTLS_BYTE_0( x ) ( (uint8_t) ( ( x ) & 0xff ) )
#define MBEDTLS_BYTE_1( x ) ( (uint8_t) ( ( ( x ) >> 8 ) & 0xff ) )