Mercurial > ecos
diff packages/hal/common/current/include/drv_api.h @ 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 | 4c750ce71ae3 |
| children | d2c90368aeef |
line wrap: on
line diff
--- a/packages/hal/common/current/include/drv_api.h +++ b/packages/hal/common/current/include/drv_api.h @@ -8,29 +8,38 @@ // Native API for Kernel // //========================================================================== -//####COPYRIGHTBEGIN#### -// -// ------------------------------------------- -// The contents of this file are subject to the Red Hat eCos Public License -// Version 1.1 (the "License"); you may not use this file except in -// compliance with the License. You may obtain a copy of the License at -// http://www.redhat.com/ -// -// Software distributed under the License is distributed on an "AS IS" -// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -// License for the specific language governing rights and limitations under -// the License. -// -// The Original Code is eCos - Embedded Configurable Operating System, -// released September 30, 1998. -// -// The Initial Developer of the Original Code is Red Hat. -// Portions created by Red Hat are -// Copyright (C) 1998, 1999, 2000 Red Hat, Inc. -// All Rights Reserved. -// ------------------------------------------- -// -//####COPYRIGHTEND#### +//####ECOSGPLCOPYRIGHTBEGIN#### +// ------------------------------------------- +// This file is part of eCos, the Embedded Configurable Operating System. +// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. +// +// eCos is free software; you can redistribute it and/or modify it under +// the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2 or (at your option) any later version. +// +// eCos is distributed in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or +// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +// for more details. +// +// You should have received a copy of the GNU General Public License along +// with eCos; if not, write to the Free Software Foundation, Inc., +// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +// +// As a special exception, if other files instantiate templates or use macros +// or inline functions from this file, or you compile this file and link it +// with other works to produce a work based on this file, this file does not +// by itself cause the resulting work to be covered by the GNU General Public +// License. However the source code for this file must still be made available +// in accordance with section (3) of the GNU General Public License. +// +// This exception does not invalidate any other reasons why a work based on +// this file might be covered by the GNU General Public License. +// +// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc. +// at http://sources.redhat.com/ecos/ecos-license +// ------------------------------------------- +//####ECOSGPLCOPYRIGHTEND#### //========================================================================== //#####DESCRIPTIONBEGIN#### // @@ -64,60 +73,62 @@ #include <cyg/kernel/kapi.h> -#define cyg_drv_isr_lock cyg_interrupt_disable -#define cyg_drv_isr_unlock cyg_interrupt_enable - -#define cyg_drv_dsr_lock cyg_scheduler_lock -#define cyg_drv_dsr_unlock cyg_scheduler_unlock - -#define cyg_drv_mutex_t cyg_mutex_t -#define cyg_drv_mutex_init cyg_mutex_init -#define cyg_drv_mutex_destroy cyg_mutex_destroy -#define cyg_drv_mutex_lock cyg_mutex_lock -#define cyg_drv_mutex_trylock cyg_mutex_trylock -#define cyg_drv_mutex_unlock cyg_mutex_unlock -#define cyg_drv_mutex_release cyg_mutex_release - -#define cyg_drv_cond_t cyg_cond_t -#define cyg_drv_cond_init cyg_cond_init -#define cyg_drv_cond_destroy cyg_cond_destroy -#define cyg_drv_cond_wait cyg_cond_wait -#define cyg_drv_cond_signal cyg_cond_signal -#define cyg_drv_cond_broadcast cyg_cond_broadcast - -#define cyg_drv_interrupt_create cyg_interrupt_create -#define cyg_drv_interrupt_delete cyg_interrupt_delete -#define cyg_drv_interrupt_attach cyg_interrupt_attach -#define cyg_drv_interrupt_detach cyg_interrupt_detach -#define cyg_drv_interrupt_mask cyg_interrupt_mask -#define cyg_drv_interrupt_unmask cyg_interrupt_unmask -#define cyg_drv_interrupt_acknowledge cyg_interrupt_acknowledge -#define cyg_drv_interrupt_configure cyg_interrupt_configure -#define cyg_drv_interrupt_level cyg_interrupt_level -#define cyg_drv_interrupt_set_cpu cyg_interrupt_set_cpu -#define cyg_drv_interrupt_get_cpu cyg_interrupt_get_cpu - -#define cyg_drv_spinlock_t cyg_spinlock_t -#define cyg_drv_spinlock_init cyg_spinlock_init -#define cyg_drv_spinlock_spin cyg_spinlock_spin -#define cyg_drv_spinlock_clear cyg_spinlock_clear -#define cyg_drv_spinlock_try cyg_spinlock_try -#define cyg_drv_spinlock_test cyg_spinlock_test -#define cyg_drv_spinlock_spin_intsave cyg_spinlock_spin_intsave -#define cyg_drv_spinlock_clear_intsave cyg_spinlock_clear_intsave +#define cyg_drv_isr_lock cyg_interrupt_disable +#define cyg_drv_isr_unlock cyg_interrupt_enable + +#define cyg_drv_dsr_lock cyg_scheduler_lock +#define cyg_drv_dsr_unlock cyg_scheduler_unlock + +#define cyg_drv_mutex_t cyg_mutex_t +#define cyg_drv_mutex_init cyg_mutex_init +#define cyg_drv_mutex_destroy cyg_mutex_destroy +#define cyg_drv_mutex_lock cyg_mutex_lock +#define cyg_drv_mutex_trylock cyg_mutex_trylock +#define cyg_drv_mutex_unlock cyg_mutex_unlock +#define cyg_drv_mutex_release cyg_mutex_release + +#define cyg_drv_cond_t cyg_cond_t +#define cyg_drv_cond_init cyg_cond_init +#define cyg_drv_cond_destroy cyg_cond_destroy +#define cyg_drv_cond_wait cyg_cond_wait +#define cyg_drv_cond_signal cyg_cond_signal +#define cyg_drv_cond_broadcast cyg_cond_broadcast + +#define cyg_drv_interrupt_create cyg_interrupt_create +#define cyg_drv_interrupt_delete cyg_interrupt_delete +#define cyg_drv_interrupt_attach cyg_interrupt_attach +#define cyg_drv_interrupt_detach cyg_interrupt_detach +#define cyg_drv_interrupt_mask cyg_interrupt_mask +#define cyg_drv_interrupt_unmask cyg_interrupt_unmask +#define cyg_drv_interrupt_mask_intunsafe cyg_interrupt_mask_intunsafe +#define cyg_drv_interrupt_unmask_intunsafe cyg_interrupt_unmask_intunsafe +#define cyg_drv_interrupt_acknowledge cyg_interrupt_acknowledge +#define cyg_drv_interrupt_configure cyg_interrupt_configure +#define cyg_drv_interrupt_level cyg_interrupt_level +#define cyg_drv_interrupt_set_cpu cyg_interrupt_set_cpu +#define cyg_drv_interrupt_get_cpu cyg_interrupt_get_cpu + +#define cyg_drv_spinlock_t cyg_spinlock_t +#define cyg_drv_spinlock_init cyg_spinlock_init +#define cyg_drv_spinlock_spin cyg_spinlock_spin +#define cyg_drv_spinlock_clear cyg_spinlock_clear +#define cyg_drv_spinlock_try cyg_spinlock_try +#define cyg_drv_spinlock_test cyg_spinlock_test +#define cyg_drv_spinlock_spin_intsave cyg_spinlock_spin_intsave +#define cyg_drv_spinlock_clear_intsave cyg_spinlock_clear_intsave #else /* CYGPKG_KERNEL */ /*------------------------------------------------------------------------*/ /* Non-kernel version of API */ - + typedef CYG_ADDRWORD cyg_addrword_t; /* May hold pointer or word */ typedef cyg_addrword_t cyg_handle_t; /* Object handle */ typedef cyg_uint32 cyg_priority_t; /* type for priorities */ typedef cyg_uint32 cyg_vector_t; /* Interrupt vector id */ typedef cyg_uint32 cyg_cpu_t; /* CPU id */ -typedef int cyg_bool_t; -typedef cyg_int32 cyg_code_t; /* type for various codes */ +typedef int cyg_bool_t; +typedef cyg_int32 cyg_code_t; /* type for various codes */ typedef cyg_uint32 cyg_ISR_t( cyg_vector_t vector, cyg_addrword_t data); typedef void cyg_DSR_t(cyg_vector_t vector, @@ -186,7 +197,9 @@ externC void cyg_drv_interrupt_attach( c externC void cyg_drv_interrupt_detach( cyg_handle_t interrupt ); externC void cyg_drv_interrupt_mask( cyg_vector_t vector ); +externC void cyg_drv_interrupt_mask_intunsafe( cyg_vector_t vector ); externC void cyg_drv_interrupt_unmask( cyg_vector_t vector ); +externC void cyg_drv_interrupt_unmask_intunsafe( cyg_vector_t vector ); externC void cyg_drv_interrupt_acknowledge( cyg_vector_t vector ); externC void cyg_drv_interrupt_configure( cyg_vector_t vector,
