source: rtems/cpukit/libblock/include/rtems/ramdisk.h @ 4a6d160

4.104.115
Last change on this file since 4a6d160 was 4670d91, checked in by Joel Sherrill <joel.sherrill@…>, on 05/15/09 at 12:52:12

2009-05-15 Sebastian Huber <sebastian.huber@…>

  • Doxygen.in: Fixed project name. Added project number. Enabled auto brief. Disabled include graphs.
  • include/rtems/irq-extension.h, libblock/include/rtems/bdpart.h, libblock/include/rtems/bdbuf.h, libblock/include/rtems/bdpart.h, libblock/include/rtems/blkdev.h, libblock/include/rtems/diskdevs.h, libblock/include/rtems/ramdisk.h, libblock/src/bdbuf.c, libblock/src/blkdev.c, libblock/src/diskdevs.c, libblock/src/ramdisk.c: Documentation.
  • libblock/src/bdpart.c: Documentation. Fixed NULL pointer access.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup rtems_ramdisk
5 *
6 * RAM disk block device.
7 */
8
9/*
10 * Copyright (C) 2001 OKTET Ltd., St.-Petersburg, Russia
11 * Author: Victor V. Vengerov <vvv@oktet.ru>
12 *
13 * @(#) $Id$
14 */
15
16#ifndef _RTEMS_RAMDISK_H
17#define _RTEMS_RAMDISK_H
18
19
20#include <rtems.h>
21#include <rtems/blkdev.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/**
28 * @defgroup rtems_ramdisk RAM Disk Device
29 *
30 * @ingroup rtems_blkdev
31 *
32 * @{
33 */
34
35/**
36 * RAM disk configuration table entry.
37 */
38typedef struct rtems_ramdisk_config {
39  /**
40   * RAM disk block size (must be a power of two).
41   */
42  uint32_t block_size;
43
44  /**
45   * Number of blocks on this RAM disk.
46   */
47  rtems_blkdev_bnum block_num;
48
49  /**
50   * RAM disk location or @c NULL if RAM disk memory should be allocated
51   * dynamically.
52   */
53  void *location;
54} rtems_ramdisk_config;
55
56/**
57 * External reference to the RAM disk configuration table describing each RAM
58 * disk in the system.
59 *
60 * The configuration table is provided by the application.
61 */
62extern rtems_ramdisk_config rtems_ramdisk_configuration [];
63
64/**
65 * External reference the size of the RAM disk configuration table
66 * @ref rtems_ramdisk_configuration.
67 *
68 * The configuration table size is provided by the application.
69 */
70extern size_t rtems_ramdisk_configuration_size;
71
72/**
73 * RAM disk driver initialization entry point.
74 */
75rtems_device_driver ramdisk_initialize(
76 rtems_device_major_number major,
77 rtems_device_minor_number minor,
78 void *arg
79);
80
81/**
82 * RAM disk driver table entry.
83 */
84#define RAMDISK_DRIVER_TABLE_ENTRY \
85  { \
86    .initialization_entry = ramdisk_initialize, \
87    RTEMS_GENERIC_BLOCK_DEVICE_DRIVER_ENTRIES \
88  }
89
90/** @} */
91
92#ifdef __cplusplus
93}
94#endif
95
96#endif
Note: See TracBrowser for help on using the repository browser.