Mercurial > ecos-v3_0-branch
annotate packages/hal/arm/lpc2xxx/olpcl2294/current/src/olpcl2294_misc.c @ 2836:6283be95ef53
* cdl/hal_arm_lpc2xxx_olpcl2294.cdl: Expanded a list the legal baud
rates for both diagnostic and debug channels (upon 230400b bps).
* include/hal_platform_setup.h, include/plf_io.h: Extra tabs expanded.
* include/hal_platform_setup.h: Fixed a comment about JTAG pinouts.
* src/olpcl2294_misc.c: Removed odd _impure_ptr stub.
| author | asl |
|---|---|
| date | Mon, 02 Mar 2009 20:35:21 +0000 |
| parents | 74dbf4c3f2e1 |
| children |
| rev | line source |
|---|---|
| 2665 | 1 //========================================================================== |
| 2 // | |
| 3 // olpcl2294_misc.c | |
| 4 // | |
| 5 // HAL misc board support code for Olimex LPC-L2294-1MB development | |
| 6 // board | |
| 7 // | |
| 8 //========================================================================== | |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
9 // ####ECOSGPLCOPYRIGHTBEGIN#### |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
10 // ------------------------------------------- |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
11 // This file is part of eCos, the Embedded Configurable Operating System. |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
12 // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2008 Free Software Foundation, Inc. |
| 2665 | 13 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
14 // eCos is free software; you can redistribute it and/or modify it under |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
15 // the terms of the GNU General Public License as published by the Free |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
16 // Software Foundation; either version 2 or (at your option) any later |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
17 // version. |
| 2665 | 18 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
19 // eCos is distributed in the hope that it will be useful, but WITHOUT |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
20 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
21 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
22 // for more details. |
| 2665 | 23 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
24 // You should have received a copy of the GNU General Public License |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
25 // along with eCos; if not, write to the Free Software Foundation, Inc., |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
26 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
| 2665 | 27 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
28 // As a special exception, if other files instantiate templates or use |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
29 // macros or inline functions from this file, or you compile this file |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
30 // and link it with other works to produce a work based on this file, |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
31 // this file does not by itself cause the resulting work to be covered by |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
32 // the GNU General Public License. However the source code for this file |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
33 // must still be made available in accordance with section (3) of the GNU |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
34 // General Public License v2. |
| 2665 | 35 // |
|
2729
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
36 // This exception does not invalidate any other reasons why a work based |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
37 // on this file might be covered by the GNU General Public License. |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
38 // ------------------------------------------- |
|
74dbf4c3f2e1
Update all copyright banners to reflect FSF ownership; fix and improve licence text.
jlarmour
parents:
2665
diff
changeset
|
39 // ####ECOSGPLCOPYRIGHTEND#### |
| 2665 | 40 //========================================================================== |
| 41 //#####DESCRIPTIONBEGIN#### | |
| 42 // | |
| 43 // Author(s): Sergei Gavrikov | |
| 44 // Contributors: Sergei Gavrikov | |
| 45 // Date: 2008-08-31 | |
| 46 // Purpose: HAL board support | |
| 47 // Description: Implementations of HAL board interfaces | |
| 48 // | |
| 49 //####DESCRIPTIONEND#### | |
| 50 // | |
| 51 //========================================================================*/ | |
| 52 | |
| 53 #include <pkgconf/hal.h> | |
| 54 #include <cyg/hal/hal_io.h> // IO macros | |
| 55 #include <cyg/hal/hal_arch.h> // Register state info | |
| 56 | |
| 57 #include <cyg/infra/cyg_type.h> // base types | |
| 58 #include <cyg/hal/var_io.h> | |
| 59 | |
| 60 #include <cyg/hal/hal_var_ints.h> | |
| 61 #include <cyg/hal/drv_api.h> | |
| 62 | |
| 63 extern void cyg_hal_plf_serial_init (void); | |
| 64 | |
| 65 //-------------------------------------------------------------------------- | |
| 66 // hal_lpc2xxx_set_leds -- | |
| 67 // | |
| 68 // There is one diagnostic LED marked 'STAT' on the board | |
| 69 // | |
| 70 void | |
| 71 hal_lpc2xxx_set_leds (int mask) | |
| 72 { | |
| 73 HAL_WRITE_UINT32 (CYGARC_HAL_LPC2XXX_REG_IO_BASE + | |
| 74 CYGARC_HAL_LPC2XXX_REG_IO1SET, (1 << 23)); | |
| 75 if (mask & 1) | |
| 76 HAL_WRITE_UINT32 (CYGARC_HAL_LPC2XXX_REG_IO_BASE + | |
| 77 CYGARC_HAL_LPC2XXX_REG_IO1CLR, (1 << 23)); | |
| 78 } | |
| 79 | |
| 80 //-------------------------------------------------------------------------- | |
| 81 // cyg_hal_plf_comms_init -- | |
| 82 // | |
| 83 void | |
| 84 cyg_hal_plf_comms_init (void) | |
| 85 { | |
| 86 static int initialized = 0; | |
| 87 | |
| 88 if (initialized) | |
| 89 return; | |
| 90 initialized = 1; | |
| 91 | |
| 92 cyg_hal_plf_serial_init (); | |
| 93 } | |
| 94 | |
| 95 #ifdef HAL_PLF_HARDWARE_INIT | |
| 96 //-------------------------------------------------------------------------- | |
| 97 // hal_plf_hardware_init -- | |
| 98 // | |
| 99 void | |
| 100 hal_plf_hardware_init (void) | |
| 101 { | |
| 102 // configure IRQ level from CL CS8900A | |
| 103 cyg_drv_interrupt_configure (CYGNUM_HAL_INTERRUPT_EINT2, 0, 1); | |
| 104 } | |
| 105 #endif // HAL_PLF_HARDWARE_INIT | |
| 106 | |
| 107 // indent: --indent-level4 -br -nut; vim: expandtab tabstop=4 shiftwidth=4 | |
| 108 //-------------------------------------------------------------------------- | |
| 109 // EOF olpcl2294_misc.c |
