|
RTEMS
5.1
|
Go to the documentation of this file. 40 #ifndef __ALTERA_SOCAL_H__ 41 #define __ALTERA_SOCAL_H__ 68 #define ALT_CAST(type, ptr) ptr 78 #define ALT_CAST(type, ptr) ((type) (ptr)) 103 #define alt_write_byte(dest, src) (*ALT_CAST(volatile uint8_t *, (dest)) = (src)) 109 #define alt_read_byte(src) (*ALT_CAST(volatile uint8_t *, (src))) 115 #define alt_write_hword(dest, src) (*ALT_CAST(volatile uint16_t *, (dest)) = (src)) 121 #define alt_read_hword(src) (*ALT_CAST(volatile uint16_t *, (src))) 127 #define alt_write_word(dest, src) (*ALT_CAST(volatile uint32_t *, (dest)) = (src)) 133 #define alt_read_word(src) (*ALT_CAST(volatile uint32_t *, (src))) 139 #define alt_write_dword(dest, src) (*ALT_CAST(volatile uint64_t *, (dest)) = (src)) 145 #define alt_read_dword(src) (*ALT_CAST(volatile uint64_t *, (src))) 162 #define alt_setbits_byte(dest, bits) (alt_write_byte(dest, alt_read_byte(dest) | (bits))) 168 #define alt_clrbits_byte(dest, bits) (alt_write_byte(dest, alt_read_byte(dest) & ~(bits))) 174 #define alt_xorbits_byte(dest, bits) (alt_write_byte(dest, alt_read_byte(dest) ^ (bits))) 181 #define alt_replbits_byte(dest, msk, src) (alt_write_byte(dest,(alt_read_byte(dest) & ~(msk)) | ((src) & (msk)))) 187 #define alt_setbits_hword(dest, bits) (alt_write_hword(dest, alt_read_hword(dest) | (bits))) 193 #define alt_clrbits_hword(dest, bits) (alt_write_hword(dest, alt_read_hword(dest) & ~(bits))) 199 #define alt_xorbits_hword(dest, bits) (alt_write_hword(dest, alt_read_hword(dest) ^ (bits))) 206 #define alt_replbits_hword(dest, msk, src) (alt_write_hword(dest,(alt_read_hword(dest) & ~(msk)) | ((src) & (msk)))) 212 #define alt_setbits_word(dest, bits) (alt_write_word(dest, alt_read_word(dest) | (bits))) 218 #define alt_clrbits_word(dest, bits) (alt_write_word(dest, alt_read_word(dest) & ~(bits))) 224 #define alt_xorbits_word(dest, bits) (alt_write_word(dest, alt_read_word(dest) ^ (bits))) 231 #define alt_replbits_word(dest, msk, src) (alt_write_word(dest,(alt_read_word(dest) & ~(msk)) | ((src) & (msk)))) 237 #define alt_setbits_dword(dest, bits) (alt_write_dword(dest, alt_read_dword(dest) | (bits))) 243 #define alt_clrbits_dword(dest, bits) (alt_write_dword(dest, alt_read_dword(dest) & ~(bits))) 249 #define alt_xorbits_dword(dest, bits) (alt_write_dword(dest, alt_read_dword(dest) ^ (bits))) 256 #define alt_replbits_dword(dest, msk, src) (alt_write_dword(dest,(alt_read_dword(dest) & ~(msk)) | ((src) & (msk))))