Mercurial > flash_v2
annotate packages/devs/flash/synthv2/current/include/synth.h @ 1764:96ec7e534d98
V2 flash header files clean-up. Eliminate flash_priv.h, moving the
functionality into flash_dev.h instead.
| author | bartv |
|---|---|
| date | Tue, 22 Feb 2005 21:03:43 +0000 |
| parents | 2f4e31c45a45 |
| children |
| rev | line source |
|---|---|
|
1702
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
1 #ifndef DEV_FLASH_SYNTHV2_SYNTH_H |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
2 #define DEV_FLASH_SYNTHV2_SYNTH_H |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
3 //========================================================================== |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
4 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
5 // synth.h |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
6 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
7 // Synthetic Flash driver header |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
8 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
9 //========================================================================== |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
10 //####ECOSGPLCOPYRIGHTBEGIN#### |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
11 // ------------------------------------------- |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
12 // This file is part of eCos, the Embedded Configurable Operating System. |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
13 // Copyright (C) 2004 Andrew Lunn |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
14 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
15 // eCos is free software; you can redistribute it and/or modify it under |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
16 // the terms of the GNU General Public License as published by the Free |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
17 // Software Foundation; either version 2 or (at your option) any later version. |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
18 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
19 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
20 // WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
21 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
22 // for more details. |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
23 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
24 // You should have received a copy of the GNU General Public License along |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
25 // with eCos; if not, write to the Free Software Foundation, Inc., |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
26 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
27 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
28 // As a special exception, if other files instantiate templates or use macros |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
29 // or inline functions from this file, or you compile this file and link it |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
30 // with other works to produce a work based on this file, this file does not |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
31 // by itself cause the resulting work to be covered by the GNU General Public |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
32 // License. However the source code for this file must still be made available |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
33 // in accordance with section (3) of the GNU General Public License. |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
34 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
35 // This exception does not invalidate any other reasons why a work based on |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
36 // this file might be covered by the GNU General Public License. |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
37 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
38 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
39 // at http://sources.redhat.com/ecos/ecos-license/ |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
40 // ------------------------------------------- |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
41 //####ECOSGPLCOPYRIGHTEND#### |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
42 //========================================================================== |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
43 //#####DESCRIPTIONBEGIN#### |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
44 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
45 // Author(s): Andrew Lunn |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
46 // Contributors: Andrew Lunn |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
47 // Date: 2004-07-03 |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
48 // Purpose: Header file for the synthetic flash device |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
49 // Description: |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
50 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
51 //####DESCRIPTIONEND#### |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
52 // |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
53 //========================================================================== |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
54 |
|
1764
96ec7e534d98
V2 flash header files clean-up. Eliminate flash_priv.h, moving the
bartv
parents:
1756
diff
changeset
|
55 #include <cyg/io/flash.h> |
|
96ec7e534d98
V2 flash header files clean-up. Eliminate flash_priv.h, moving the
bartv
parents:
1756
diff
changeset
|
56 #include <cyg/io/flash_dev.h> |
|
1702
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
57 |
|
1756
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
58 // Structure of data private to each flash device |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
59 struct cyg_flash_synth_priv |
|
1702
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
60 { |
|
1756
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
61 // Configuration parameters, |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
62 size_t block_size; |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
63 cyg_uint32 blocks; |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
64 size_t boot_block_size; |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
65 cyg_uint32 boot_blocks; |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
66 cyg_bool boot_block_bottom; |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
67 char * filename; |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
68 // Run-time data |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
69 int flashfd; |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
70 // Space for the block layout |
|
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
71 struct cyg_flash_block_info block_info[2]; |
|
1702
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
72 }; |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
73 |
|
1756
2f4e31c45a45
Update following changes to the flash device driver interface
bartv
parents:
1749
diff
changeset
|
74 extern const struct cyg_flash_dev_funs cyg_flash_synth_funs; |
|
1702
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
75 |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
76 #endif |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
77 |
|
0673c75f3a08
Import the first version of the synth flash driver which uses the V2 API.
asl
parents:
diff
changeset
|
78 |
