comparison packages/hal/arm/sa11x0/var/current/src/hal_diag.c @ 208:e0c0827131d1 ecos

Merge from eCos master repository on 2002-05-20-20:11:54-BST
author jlarmour
date Mon, 20 May 2002 22:19:26 +0000
parents 678094f34118
children d2c90368aeef
comparison
equal deleted inserted replaced
207:74c807ddde34 208:e0c0827131d1
3 // hal_diag.c 3 // hal_diag.c
4 // 4 //
5 // HAL diagnostic output code 5 // HAL diagnostic output code
6 // 6 //
7 //============================================================================= 7 //=============================================================================
8 //####COPYRIGHTBEGIN#### 8 //####ECOSGPLCOPYRIGHTBEGIN####
9 //
10 // ------------------------------------------- 9 // -------------------------------------------
11 // The contents of this file are subject to the Red Hat eCos Public License 10 // This file is part of eCos, the Embedded Configurable Operating System.
12 // Version 1.1 (the "License"); you may not use this file except in 11 // Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
13 // compliance with the License. You may obtain a copy of the License at 12 //
14 // http://www.redhat.com/ 13 // eCos is free software; you can redistribute it and/or modify it under
15 // 14 // the terms of the GNU General Public License as published by the Free
16 // Software distributed under the License is distributed on an "AS IS" 15 // Software Foundation; either version 2 or (at your option) any later version.
17 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the 16 //
18 // License for the specific language governing rights and limitations under 17 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
19 // the License. 18 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 // 19 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 // The Original Code is eCos - Embedded Configurable Operating System, 20 // for more details.
22 // released September 30, 1998. 21 //
23 // 22 // You should have received a copy of the GNU General Public License along
24 // The Initial Developer of the Original Code is Red Hat. 23 // with eCos; if not, write to the Free Software Foundation, Inc.,
25 // Portions created by Red Hat are 24 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
26 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc. 25 //
27 // All Rights Reserved. 26 // As a special exception, if other files instantiate templates or use macros
27 // or inline functions from this file, or you compile this file and link it
28 // with other works to produce a work based on this file, this file does not
29 // by itself cause the resulting work to be covered by the GNU General Public
30 // License. However the source code for this file must still be made available
31 // in accordance with section (3) of the GNU General Public License.
32 //
33 // This exception does not invalidate any other reasons why a work based on
34 // this file might be covered by the GNU General Public License.
35 //
36 // Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
37 // at http://sources.redhat.com/ecos/ecos-license
28 // ------------------------------------------- 38 // -------------------------------------------
29 // 39 //####ECOSGPLCOPYRIGHTEND####
30 //####COPYRIGHTEND####
31 //============================================================================= 40 //=============================================================================
32 //#####DESCRIPTIONBEGIN#### 41 //#####DESCRIPTIONBEGIN####
33 // 42 //
34 // Author(s): gthomas 43 // Author(s): gthomas
35 // Contributors:nickg, gthomas, dmoseley 44 // Contributors:nickg, gthomas, dmoseley
249 case __COMMCTL_GETBAUD: 258 case __COMMCTL_GETBAUD:
250 ret = chan->baud_rate; 259 ret = chan->baud_rate;
251 break; 260 break;
252 case __COMMCTL_SETBAUD: 261 case __COMMCTL_SETBAUD:
253 chan->baud_rate = va_arg(ap, cyg_int32); 262 chan->baud_rate = va_arg(ap, cyg_int32);
263 // Should we verify this value here?
254 init_channel(chan); 264 init_channel(chan);
265 ret = 0;
255 break; 266 break;
256 case __COMMCTL_IRQ_ENABLE: 267 case __COMMCTL_IRQ_ENABLE:
257 irq_state = 1; 268 irq_state = 1;
258 269
259 chan->base->utcr3 |= SA11X0_UART_RX_FIFO_INT_ENABLED; 270 chan->base->utcr3 |= SA11X0_UART_RX_FIFO_INT_ENABLED;