38#if !defined (_RTEMS_FLASHDISK_H_)
39#define _RTEMS_FLASHDISK_H_
150#define RTEMS_FLASHDISK_DEVICE_BASE_NAME "/dev/fdd"
152#define RTEMS_FDISK_IOCTL_ERASE_DISK _IO('B', 128)
153#define RTEMS_FDISK_IOCTL_COMPACT _IO('B', 129)
154#define RTEMS_FDISK_IOCTL_ERASE_USED _IO('B', 130)
155#define RTEMS_FDISK_IOCTL_MONITORING _IO('B', 131)
156#define RTEMS_FDISK_IOCTL_INFO_LEVEL _IO('B', 132)
157#define RTEMS_FDISK_IOCTL_PRINT_STATUS _IO('B', 133)
166 uint32_t block_count;
167 uint32_t unavail_blocks;
168 uint32_t device_count;
169 uint32_t segment_count;
171 uint32_t blocks_used;
172 uint32_t segs_available;
174 uint32_t segs_failed;
177 uint32_t pages_active;
204#define RTEMS_FDISK_KBYTES(_k) (UINT32_C(1024) * (_k))
433#define RTEMS_FDISK_BACKGROUND_ERASE (1 << 0)
438#define RTEMS_FDISK_BACKGROUND_COMPACT (1 << 1)
445#define RTEMS_FDISK_CHECK_PAGES (1 << 2)
451#define RTEMS_FDISK_BLANK_CHECK_BEFORE_WRITE (1 << 3)
uint32_t rtems_device_major_number
This integer type represents the major number of devices.
Definition: io.h:103
uint32_t rtems_device_minor_number
This integer type represents the minor number of devices.
Definition: io.h:115
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
rtems_device_driver rtems_fdisk_initialize(rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
struct rtems_fdisk_driver_handlers rtems_fdisk_driver_handlers
Flash Low Level driver handlers.
struct rtems_flashdisk_config rtems_flashdisk_config
RTEMS Flash Disk configuration table used to initialise the driver.
const rtems_flashdisk_config rtems_flashdisk_configuration[]
External reference to the configuration. Please supply. Support is present in confdefs....
uint32_t rtems_flashdisk_configuration_size
External reference to the number of configurations. Please supply. Support is present in confdefs....
struct rtems_fdisk_segment_desc rtems_fdisk_segment_desc
Flash Segment Descriptor holds, number of continuous segments in the device of this type,...
struct rtems_fdisk_monitor_data rtems_fdisk_monitor_data
Flash Disk Monitoring Data allows a user to obtain the current status of the disk.
struct rtems_fdisk_device_desc rtems_fdisk_device_desc
Flash Device Descriptor holds the segments in a device.
This header file defines the RTEMS Classic API.
Flash Device Descriptor holds the segments in a device.
Definition: flashdisk.h:365
const rtems_fdisk_driver_handlers * flash_ops
Definition: flashdisk.h:368
const rtems_fdisk_segment_desc * segments
Definition: flashdisk.h:367
uint32_t segment_count
Definition: flashdisk.h:366
Flash Low Level driver handlers.
Definition: flashdisk.h:220
int(* write)(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, const void *buffer, uint32_t size)
Definition: flashdisk.h:264
int(* erase_device)(const struct rtems_fdisk_device_desc *dd, uint32_t device)
Definition: flashdisk.h:348
int(* verify)(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, const void *buffer, uint32_t size)
Definition: flashdisk.h:312
int(* erase)(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment)
Definition: flashdisk.h:332
int(* read)(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, void *buffer, uint32_t size)
Definition: flashdisk.h:239
int(* blank)(const rtems_fdisk_segment_desc *sd, uint32_t device, uint32_t segment, uint32_t offset, uint32_t size)
Definition: flashdisk.h:288
Flash Disk Monitoring Data allows a user to obtain the current status of the disk.
Definition: flashdisk.h:164
Flash Segment Descriptor holds, number of continuous segments in the device of this type,...
Definition: flashdisk.h:194
uint32_t size
Definition: flashdisk.h:198
uint16_t segment
Definition: flashdisk.h:196
uint32_t offset
Definition: flashdisk.h:197
uint16_t count
Definition: flashdisk.h:195
RTEMS Flash Disk configuration table used to initialise the driver.
Definition: flashdisk.h:401
uint32_t flags
Definition: flashdisk.h:405
uint32_t avail_compact_segs
Definition: flashdisk.h:422
uint32_t info_level
Definition: flashdisk.h:423
uint32_t block_size
Definition: flashdisk.h:402
const rtems_fdisk_device_desc * devices
Definition: flashdisk.h:404
uint32_t compact_segs
Definition: flashdisk.h:414
uint32_t device_count
Definition: flashdisk.h:403
uint32_t unavail_blocks
Definition: flashdisk.h:412
unsigned size
Definition: tte.h:1