RTEMS
5.1
|
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | ALT_CAST(type, ptr) ((type) (ptr)) |
#define | alt_write_byte(dest, src) (*ALT_CAST(volatile uint8_t *, (dest)) = (src)) |
#define | alt_read_byte(src) (*ALT_CAST(volatile uint8_t *, (src))) |
#define | alt_write_hword(dest, src) (*ALT_CAST(volatile uint16_t *, (dest)) = (src)) |
#define | alt_read_hword(src) (*ALT_CAST(volatile uint16_t *, (src))) |
#define | alt_write_word(dest, src) (*ALT_CAST(volatile uint32_t *, (dest)) = (src)) |
#define | alt_read_word(src) (*ALT_CAST(volatile uint32_t *, (src))) |
#define | alt_write_dword(dest, src) (*ALT_CAST(volatile uint64_t *, (dest)) = (src)) |
#define | alt_read_dword(src) (*ALT_CAST(volatile uint64_t *, (src))) |
#define | alt_setbits_byte(dest, bits) (alt_write_byte(dest, alt_read_byte(dest) | (bits))) |
#define | alt_clrbits_byte(dest, bits) (alt_write_byte(dest, alt_read_byte(dest) & ~(bits))) |
#define | alt_xorbits_byte(dest, bits) (alt_write_byte(dest, alt_read_byte(dest) ^ (bits))) |
#define | alt_replbits_byte(dest, msk, src) (alt_write_byte(dest,(alt_read_byte(dest) & ~(msk)) | ((src) & (msk)))) |
#define | alt_setbits_hword(dest, bits) (alt_write_hword(dest, alt_read_hword(dest) | (bits))) |
#define | alt_clrbits_hword(dest, bits) (alt_write_hword(dest, alt_read_hword(dest) & ~(bits))) |
#define | alt_xorbits_hword(dest, bits) (alt_write_hword(dest, alt_read_hword(dest) ^ (bits))) |
#define | alt_replbits_hword(dest, msk, src) (alt_write_hword(dest,(alt_read_hword(dest) & ~(msk)) | ((src) & (msk)))) |
#define | alt_setbits_word(dest, bits) (alt_write_word(dest, alt_read_word(dest) | (bits))) |
#define | alt_clrbits_word(dest, bits) (alt_write_word(dest, alt_read_word(dest) & ~(bits))) |
#define | alt_xorbits_word(dest, bits) (alt_write_word(dest, alt_read_word(dest) ^ (bits))) |
#define | alt_replbits_word(dest, msk, src) (alt_write_word(dest,(alt_read_word(dest) & ~(msk)) | ((src) & (msk)))) |
#define | alt_setbits_dword(dest, bits) (alt_write_dword(dest, alt_read_dword(dest) | (bits))) |
#define | alt_clrbits_dword(dest, bits) (alt_write_dword(dest, alt_read_dword(dest) & ~(bits))) |
#define | alt_xorbits_dword(dest, bits) (alt_write_dword(dest, alt_read_dword(dest) ^ (bits))) |
#define | alt_replbits_dword(dest, msk, src) (alt_write_dword(dest,(alt_read_dword(dest) & ~(msk)) | ((src) & (msk)))) |