|
RTEMS
5.1
|
Go to the documentation of this file. 25 #if !defined (_RTEMS_RFS_DATA_H_) 26 #define _RTEMS_RFS_DATA_H_ 33 #define rtems_rfs_data_ptr(_d) ((uint8_t*)(_d)) 38 #define rtems_rfs_data_get(_d, _t, _o, _s) \ 39 (((_t)(rtems_rfs_data_ptr (_d)[_o])) << (_s)) 44 #define rtems_rfs_read_u8(_d) \ 45 (*rtems_rfs_data_ptr (_d)) 50 #define rtems_rfs_read_u16(_d) \ 51 (rtems_rfs_data_get (_d, uint16_t, 0, 8) | \ 52 rtems_rfs_data_get (_d, uint16_t, 1, 0)) 57 #define rtems_rfs_read_u32(_d) \ 58 (rtems_rfs_data_get (_d, uint32_t, 0, 24) | \ 59 rtems_rfs_data_get (_d, uint32_t, 1, 16) | \ 60 rtems_rfs_data_get (_d, uint32_t, 2, 8) | \ 61 rtems_rfs_data_get (_d, uint32_t, 3, 0)) 66 #define rtems_rfs_write_u8(_d, _v) \ 67 (*rtems_rfs_data_ptr (_d) = (uint8_t)(_v)) 72 #define rtems_rfs_write_u16(_d, _v) \ 74 rtems_rfs_data_ptr (_d)[0] = (uint8_t)(((uint16_t)(_v)) >> 8); \ 75 rtems_rfs_data_ptr (_d)[1] = (uint8_t)((_v)); \ 81 #define rtems_rfs_write_u32(_d, _v) \ 83 rtems_rfs_data_ptr (_d)[0] = (uint8_t)(((uint32_t)(_v)) >> 24); \ 84 rtems_rfs_data_ptr (_d)[1] = (uint8_t)(((uint32_t)(_v)) >> 16); \ 85 rtems_rfs_data_ptr (_d)[2] = (uint8_t)(((uint32_t)(_v)) >> 8); \ 86 rtems_rfs_data_ptr (_d)[3] = (uint8_t)((uint32_t)(_v)); \