annotate packages/devs/spi/arm/at91/current/src/spi_at91_init.cxx @ 2807:9a8446cf24e9

* src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of 2009-02-11. Define an empty CYGBLD_ATTRIB_C_INIT_PRI and rely on spi_at91_init.cxx to call, in case the compiler does not supply that macro (e.g. if too old). * cdl/spi_at91.cdl: Revert change of 2009-02-11. * src/spi_at91_init.cxx: Revive. Set priority to CYG_INIT_BUS_SPI. Conditionalise on CYGBLD_ATTRIB_C_INIT_PRI.
author jlarmour
date Mon, 16 Feb 2009 23:34:51 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2807
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
1 //==========================================================================
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
2 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
3 // spi_at91_init.cxx
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
4 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
5 // Atmel AT91 (ARM) SPI bus init
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
6 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
7 //==========================================================================
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
8 // ####ECOSGPLCOPYRIGHTBEGIN####
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
9 // -------------------------------------------
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
10 // This file is part of eCos, the Embedded Configurable Operating System.
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
11 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2009 Free Software Foundation, Inc.
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
12 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
13 // eCos is free software; you can redistribute it and/or modify it under
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
14 // the terms of the GNU General Public License as published by the Free
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
15 // Software Foundation; either version 2 or (at your option) any later
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
16 // version.
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
17 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
18 // eCos is distributed in the hope that it will be useful, but WITHOUT
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
19 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
20 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
21 // for more details.
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
22 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
23 // You should have received a copy of the GNU General Public License
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
24 // along with eCos; if not, write to the Free Software Foundation, Inc.,
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
25 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
26 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
27 // As a special exception, if other files instantiate templates or use
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
28 // macros or inline functions from this file, or you compile this file
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
29 // and link it with other works to produce a work based on this file,
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
30 // this file does not by itself cause the resulting work to be covered by
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
31 // the GNU General Public License. However the source code for this file
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
32 // must still be made available in accordance with section (3) of the GNU
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
33 // General Public License v2.
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
34 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
35 // This exception does not invalidate any other reasons why a work based
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
36 // on this file might be covered by the GNU General Public License.
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
37 // -------------------------------------------
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
38 // ####ECOSGPLCOPYRIGHTEND####
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
39 //==========================================================================
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
40 //#####DESCRIPTIONBEGIN####
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
41 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
42 // Author(s): Savin Zlobec <savin@elatec.si>
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
43 // Date: 2004-08-25
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
44 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
45 //####DESCRIPTIONEND####
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
46 //
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
47 //==========================================================================
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
48
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
49 #include <cyg/infra/cyg_type.h>
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
50
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
51 // This file is not needed if we support CYGBLD_ATTRIB_C_INIT_PRI, as the
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
52 // init happens directly in spi_at91.c then.
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
53 #ifndef CYGBLD_ATTRIB_C_INIT_PRI
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
54
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
55 // -------------------------------------------------------------------------
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
56
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
57 externC void cyg_spi_at91_bus_init(void);
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
58
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
59 class cyg_spi_at91_bus_init_class {
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
60 public:
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
61 cyg_spi_at91_bus_init_class(void) {
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
62 cyg_spi_at91_bus_init();
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
63 }
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
64 };
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
65
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
66 // -------------------------------------------------------------------------
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
67
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
68 static cyg_spi_at91_bus_init_class spi_at91_bus_init CYGBLD_ATTRIB_INIT_PRI(CYG_INIT_BUS_SPI);
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
69
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
70 #endif // ifndef CYGBLD_ATTRIB_C_INIT_PRI
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
71
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
72 // -------------------------------------------------------------------------
9a8446cf24e9 * src/spi_at91.c (cyg_spi_at91_bus_init): Partially revert change of
jlarmour
parents:
diff changeset
73 // EOF spi_at91_init.cxx