Changes between Version 11 and Version 12 of TBR/UserManual/Using_the_RTEMS_DOS_File_System
- Timestamp:
- 10/22/08 05:17:48 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TBR/UserManual/Using_the_RTEMS_DOS_File_System
v11 v12 207 207 } rtems_nvdisk_device_desc; 208 208 209 The {{{flags</code> field provides a private set of flags a specific low level device handlers for a device may need. The {{{base</base> is the base address of the device. Its definition depends on the low level device handlers for a specific device. The {{{size</code> field defines the number of bytes of storage the device provides in bytes. This is the raw number of bytes available to the driver. The {{{nv_ops</code> is a set of handlers for the specific device. 209 The fields are: 210 211 # The {{{flags</code> field provides a private set of flags a specific low level device handlers for a device may need. 212 # The {{{base</code> is the base address of the device. Its definition depends on the low level device handlers for a specific device. 213 # The {{{size</code> field defines the number of bytes of storage the device provides in bytes. This is the raw number of bytes available to the driver. 214 # The {{{nv_ops</code> is a set of handlers for the specific device. 210 215 211 216 The NV Disk device requires a set of handlers for each type of device. The handles can manage more than one device in a disk or disks. The handlers are: 212 217 213 {{{int (* read) (uint32_t device, uint32_t flags, uint32_t base, uint32_t offset,214 218 {{{int (*<i><b>read</b></i>) (uint32_t device, uint32_t flags, uint32_t base, uint32_t offset, 219 :: void* buffer, uint32_t size);</code> 215 220 : Read a block of data from the {{{offset</code> in the {{{device</code> with the {{{base</code> address to the provided {{{buffer</code>. 216 221 217 {{{int (* write) (uint32_t device, uint32_t flags, uint32_t base, uint32_t offset,218 222 {{{int (*<i><b>write</b></i>) (uint32_t device, uint32_t flags, uint32_t base, uint32_t offset, 223 :: const void* buffer, uint32_t size);</code> 219 224 : Write a block of data to the {{{offset</code> in the {{{device</code> with the {{{base</code> address from the provided {{{buffer</code>. 220 225 221 {{{int (* verify) (uint32_t device, uint32_t flags, uint32_t base, uint32_t offset,222 226 {{{int (*<i><b>verify</b></i>) (uint32_t device, uint32_t flags, uint32_t base, uint32_t offset, 227 :: const void* buffer, uint32_t size);</code> 223 228 : Verify a block of data provided in {{{buffer</code> against to the data at the {{{offset</code> in the {{{device</code> with this {{{base</code> address. 224 229 225 230 The <tt>nvdisk-sram.h</tt> provides a set of handlers suitable for static RAM. 231 232 To configure a NV disk add this following to a source file in your application. The configuration items are: 233 234 # Block size. This is normally 512 for the MSDOS file-system. 235 # Number of device descriptions. 236 # Pointer to the device descriptions. 237 #