1 #ifndef CYGONCE_DISKIO_H
2 #define CYGONCE_DISKIO_H
3 // ====================================================================
9 // ====================================================================
10 //####ECOSGPLCOPYRIGHTBEGIN####
11 // -------------------------------------------
12 // This file is part of eCos, the Embedded Configurable Operating System.
13 // Copyright (C) 2003 Savin Zlobec
15 // eCos is free software; you can redistribute it and/or modify it under
16 // the terms of the GNU General Public License as published by the Free
17 // Software Foundation; either version 2 or (at your option) any later version.
19 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
20 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 // You should have received a copy of the GNU General Public License along
25 // with eCos; if not, write to the Free Software Foundation, Inc.,
26 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
28 // As a special exception, if other files instantiate templates or use macros
29 // or inline functions from this file, or you compile this file and link it
30 // with other works to produce a work based on this file, this file does not
31 // by itself cause the resulting work to be covered by the GNU General Public
32 // License. However the source code for this file must still be made available
33 // in accordance with section (3) of the GNU General Public License.
35 // This exception does not invalidate any other reasons why a work based on
36 // this file might be covered by the GNU General Public License.
38 // -------------------------------------------
39 //####ECOSGPLCOPYRIGHTEND####
40 // ====================================================================
41 //#####DESCRIPTIONBEGIN####
45 // Purpose: Special support for disk I/O devices
48 //####DESCRIPTIONEND####
50 // ====================================================================
52 // This file contains the user-level visible I/O interfaces
54 #include <pkgconf/hal.h>
55 #include <cyg/infra/cyg_type.h>
56 #include <cyg/io/config_keys.h>
63 char serial[20+1]; // serial number
64 char firmware_rev[8+1]; // firmware revision
65 char model_num[40+1]; // model number
66 cyg_uint32 cylinders_num; // number of cylinders (CHS)
67 cyg_uint32 heads_num; // number of heads (CHS)
68 cyg_uint32 sectors_num; // number of sectors per track (CHS)
69 cyg_uint32 lba_sectors_num; // total number of sectors in LBA mode
70 } cyg_disk_identify_t;
73 cyg_uint8 type; // partition type
74 cyg_uint8 state; // state 0x00 - inactive, 0x80 - active
75 cyg_uint32 start; // first sector number
76 cyg_uint32 end; // last sector number
77 cyg_uint32 size; // size in sectors
78 } cyg_disk_partition_t;
81 cyg_disk_partition_t *partitions; // partition table
82 int partitions_num;// partition table size
83 cyg_disk_identify_t ident; // identify data
84 cyg_uint32 block_size; // block size
85 cyg_uint32 blocks_num; // number of blocks on disk
86 cyg_bool connected; // true if device connected
93 #endif /* CYGONCE_DISKIO_H */