RTEMS Logo

RTEMS 4.6.1 On-Line Library


Non-Volatile Memory Driver Read from a Particular Memory Partition

PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

14.7: Read from a Particular Memory Partition

This corresponds to the driver read call. After validating the minor number and arguments, this call enables reads from the specified memory area by invoking the user supplied "enable reads handler" and then reads the indicated memory area. When invoked the argument_block is actually a pointer to the following structure type:

typedef struct {
  rtems_unsigned32   offset;
  void              *buffer;
  rtems_unsigned32   length;
  rtems_unsigned32   status;
}   Non_volatile_memory_Driver_arguments;

The driver reads length bytes starting at offset into the partition and places them at buffer. The result is returned in status.

After the read operation is complete, the user supplied "disable reads handler" is invoked to protect the memory area again.


PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2004 OAR Corporation