RTEMS Logo

RTEMS 4.9.2 On-Line Library


Non-Volatile Memory Driver Write to a Particular Memory Partition

PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

14.8: Write to a Particular Memory Partition

This corresponds to the driver write call. After validating the minor number and arguments, this call enables writes to the specified memory area by invoking the "enable writes handler", then unprotecting the memory area, and finally actually writing to 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 writes length bytes from buffer and writes them to the non-volatile memory starting at offset into the partition. The result is returned in status.

After the write operation is complete, the "disable writes handler" is invoked to protect the memory area again.


PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2008 OAR Corporation