25 #if !defined (_RTEMS_NVDISK_H_) 26 #define _RTEMS_NVDISK_H_ 36 #define RTEMS_NVDISK_DEVICE_BASE_NAME "/dev/nvd" 57 #define RTEMS_NVDISK_IOCTL_ERASE_DISK _IO('B', 128) 58 #define RTEMS_NVDISK_IOCTL_MONITORING _IO('B', 129) 59 #define RTEMS_NVDISK_IOCTL_INFO_LEVEL _IO('B', 130) 60 #define RTEMS_NVDISK_IOCTL_PRINT_STATUS _IO('B', 131) 71 uint32_t pages_available;
79 #define RTEMS_NVDISK_KBYTES(_k) ((_k) * 1024) 104 int (*
read) (uint32_t device, uint32_t flags,
void* base,
105 uint32_t offset,
void* buffer,
size_t size);
120 int (*
write) (uint32_t device, uint32_t flags,
void* base,
121 uint32_t offset,
const void* buffer,
size_t size);
136 int (*verify) (uint32_t device, uint32_t flags,
void* base,
137 uint32_t offset,
const void* buffer,
size_t size);
181 #define RTEMS_NVDISK_CHECK_PAGES (1 << 0) 196 rtems_device_minor_number minor,
ssize_t read(int fd, void *buffer, size_t count)
POSIX 1003.1b 6.4.1 - Read From a File.
Definition: read.c:27
uint32_t rtems_nvdisk_configuration_size
External reference to the number of configurations.
uint32_t flags
Private user flags.
Definition: nvdisk.h:152
void * base
Base address of the device.
Definition: nvdisk.h:153
uint32_t size
Size of the device.
Definition: nvdisk.h:154
NV Low Level driver handlers.
Definition: nvdisk.h:89
ssize_t write(int fd, const void *buffer, size_t count)
POSIX 1003.1b 6.4.2 - Write to a File.
Definition: write.c:30
struct rtems_nvdisk_driver_handlers rtems_nvdisk_driver_handlers
NV Low Level driver handlers.
RTEMS Non-Volatile Disk configuration table used to initialise the driver.
Definition: nvdisk.h:162
NV Device Descriptor holds the description of a device that is part of the NV disk.
Definition: nvdisk.h:150
const rtems_nvdisk_device_desc * devices
The device descriptions.
Definition: nvdisk.h:166
rtems_status_code
Classic API Status.
Definition: status.h:46
NV Disk Monitoring Data allows a user to obtain the current status of the disk.
Definition: nvdisk.h:66
uint32_t block_size
The block size.
Definition: nvdisk.h:164
struct rtems_nvdisk_device_desc rtems_nvdisk_device_desc
NV Device Descriptor holds the description of a device that is part of the NV disk.
uint32_t device_count
The number of devices.
Definition: nvdisk.h:165
struct rtems_nvdisk_config rtems_nvdisk_config
RTEMS Non-Volatile Disk configuration table used to initialise the driver.
rtems_device_driver rtems_nvdisk_initialize(rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
Non-volatile disk device driver initialization.
Definition: nvdisk.c:765
struct rtems_nvdisk_monitor_data rtems_nvdisk_monitor_data
NV Disk Monitoring Data allows a user to obtain the current status of the disk.
uint32_t info_level
Default info level.
Definition: nvdisk.h:169
const rtems_nvdisk_driver_handlers * nv_ops
Device handlers.
Definition: nvdisk.h:155
uint32_t flags
Set of flags to control driver.
Definition: nvdisk.h:167