Unaligned access using direct references. More...
#include <compiler.h>#include <stdint.h>Go to the source code of this file.
Defines | |
Reading and Writing Unaligned Big Endian Values | |
| #define | read_unaligned_be16(ptr) be16_to_cpu(read_unaligned_16(ptr)) |
| Read 16-bit Big Endian value from a possibly unaligned address. | |
| #define | read_unaligned_be32(ptr) be32_to_cpu(read_unaligned_32(ptr)) |
| Read 32-bit Big Endian value from a possibly unaligned address. | |
| #define | write_unaligned_be16(ptr, value) write_unaligned_16(ptr, cpu_to_be16(value)) |
| Write 16-bit Big Endian value to a possibly unaligned address. | |
| #define | write_unaligned_be32(ptr, value) write_unaligned_32(ptr, cpu_to_be32(value)) |
| Write 32-bit Big Endian value to a possibly unaligned address. | |
Reading and Writing Unaligned Little Endian Values | |
| #define | read_unaligned_le16(ptr) le16_to_cpu(read_unaligned_16(ptr)) |
| Read 16-bit Little Endian value from a possibly unaligned address. | |
| #define | read_unaligned_le32(ptr) le32_to_cpu(read_unaligned_32(ptr)) |
| Read 32-bit Little Endian value from a possibly unaligned address. | |
| #define | write_unaligned_le16(ptr, value) write_unaligned_16(ptr, cpu_to_le16(value)) |
| Write 16-bit Little Endian value to a possibly unaligned address. | |
| #define | write_unaligned_le32(ptr, value) write_unaligned_32(ptr, cpu_to_le32(value)) |
| Write 32-bit Little Endian value to a possibly unaligned address. | |
Functions | |
Reading and Writing Unaligned Native Endian Values | |
| static __always_inline uint16_t | read_unaligned_16 (const void *ptr) |
| Read 16-bit value from a possibly unaligned address. | |
| static __always_inline uint32_t | read_unaligned_32 (const void *ptr) |
| Read 32-bit value from a possibly unaligned address. | |
| static __always_inline void | write_unaligned_16 (void *ptr, uint16_t value) |
| Write 16-bit value to a possibly unaligned address. | |
| static __always_inline void | write_unaligned_32 (void *ptr, uint32_t value) |
| Write 32-bit value to a possibly unaligned address. | |
Unaligned access using direct references.
This implementation of the unaligned access helpers works on CPUs which can do unaligned access natively.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file unaligned-direct.h.
1.6.3