RTEMS Logo

RTEMS 4.9.2 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 {
  uint32_t  offset;
  void     *buffer;
  uint32_t  length;
  uint32_t  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-2008 OAR Corporation