Changeset f22c154 in rtems for cpukit/libblock
- Timestamp:
- 05/22/10 16:51:05 (14 years ago)
- Branches:
- 4.10, 4.11, 5, master
- Children:
- f16a1458
- Parents:
- 2ad5753
- Location:
- cpukit/libblock
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libblock/include/rtems/nvdisk.h
r2ad5753 rf22c154 100 100 * @retval EIO The read did not complete. 101 101 */ 102 int (*read) (uint32_t device, uint32_t flags, uint32_tbase,103 uint32_t offset, void* buffer, uint32_t size);102 int (*read) (uint32_t device, uint32_t flags, void* base, 103 uint32_t offset, void* buffer, size_t size); 104 104 105 105 /** … … 116 116 * @retval EIO The write did not complete or verify. 117 117 */ 118 int (*write) (uint32_t device, uint32_t flags, uint32_tbase,119 uint32_t offset, const void* buffer, uint32_t size);118 int (*write) (uint32_t device, uint32_t flags, void* base, 119 uint32_t offset, const void* buffer, size_t size); 120 120 121 121 /** … … 132 132 * @retval EIO The data did not verify. 133 133 */ 134 int (*verify) (uint32_t device, uint32_t flags, uint32_tbase,135 uint32_t offset, const void* buffer, uint32_t size);134 int (*verify) (uint32_t device, uint32_t flags, void* base, 135 uint32_t offset, const void* buffer, size_t size); 136 136 137 137 } rtems_nvdisk_driver_handlers; … … 149 149 { 150 150 uint32_t flags; /**< Private user flags. */ 151 uint32_tbase; /**< Base address of the device. */151 void* base; /**< Base address of the device. */ 152 152 uint32_t size; /**< Size of the device. */ 153 153 const rtems_nvdisk_driver_handlers* nv_ops; /**< Device handlers. */ -
cpukit/libblock/src/nvdisk-sram.c
r2ad5753 rf22c154 28 28 rtems_nvdisk_sram_read (uint32_t device __attribute__((unused)), 29 29 uint32_t flags __attribute__((unused)), 30 uint32_tbase,30 void* base, 31 31 uint32_t offset, 32 32 void* buffer, 33 uint32_tsize)33 size_t size) 34 34 { 35 memcpy (buffer, ( char*) (base + offset), size);35 memcpy (buffer, (base + offset), size); 36 36 return 0; 37 37 } … … 40 40 rtems_nvdisk_sram_write (uint32_t device __attribute__((unused)), 41 41 uint32_t flags __attribute__((unused)), 42 uint32_tbase,42 void* base, 43 43 uint32_t offset, 44 44 const void* buffer, 45 uint32_tsize)45 size_t size) 46 46 { 47 memcpy (( char*) (base + offset), buffer, size);47 memcpy ((base + offset), buffer, size); 48 48 return 0; 49 49 } … … 52 52 rtems_nvdisk_sram_verify (uint32_t device __attribute__((unused)), 53 53 uint32_t flags __attribute__((unused)), 54 uint32_tbase,54 void* base, 55 55 uint32_t offset, 56 56 const void* buffer, 57 uint32_tsize)57 size_t size) 58 58 { 59 return memcmp (( char*) (base + offset), buffer, size) == 0 ? 0 : EIO;59 return memcmp ((base + offset), buffer, size) == 0 ? 0 : EIO; 60 60 } 61 61
Note: See TracChangeset
for help on using the changeset viewer.