?? vectors.c
字號:
/*
*Copyright (c) 2000-2002 Viola Systems Ltd.
*All rights reserved.
*
*Redistribution and use in source and binary forms, with or without
*modification, are permitted provided that the following conditions
*are met:
*
*1. Redistributions of source code must retain the above copyright
*notice, this list of conditions and the following disclaimer.
*
*2. Redistributions in binary form must reproduce the above copyright
*notice, this list of conditions and the following disclaimer in the
*documentation and/or other materials provided with the distribution.
*
*3. The end-user documentation included with the redistribution, if
*any, must include the following acknowledgment:
* "This product includes software developed by Viola
* Systems (http://www.violasystems.com/)."
*
*Alternately, this acknowledgment may appear in the software itself,
*if and wherever such third-party acknowledgments normally appear.
*
*4. The names "OpenTCP" and "Viola Systems" must not be used to
*endorse or promote products derived from this software without prior
*written permission. For written permission, please contact
*opentcp@opentcp.org.
*
*5. Products derived from this software may not be called "OpenTCP",
*nor may "OpenTCP" appear in their name, without prior written
*permission of the Viola Systems Ltd.
*
*THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
*WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
*MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
*IN NO EVENT SHALL VIOLA SYSTEMS LTD. OR ITS CONTRIBUTORS BE LIABLE
*FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
*CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
*SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
*BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
*WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
*OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
*EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*====================================================================
*
*OpenTCP is the unified open source TCP/IP stack available on a series
*of 8/16-bit microcontrollers, please see <http://www.opentcp.org>.
*
*For more information on how to network-enable your devices, or how to
*obtain commercial technical support for OpenTCP, please see
*<http://www.violasystems.com/>.
*/
/** \file vectors.c
* \brief Atmel AT89S8252 specific vector definitions
* \author
* \li Jari Lahti (jari.lahti@violasystems.com)
* \version 1.0
* \date 27.01.2003
* \bug
* \warning
* \todo
*
* This file contains interrupt level priority settings and interrupt
* vector definitions.
*/
/* Alexey Selischev (bmp@beep.ru) */
#include <inet/arch/at89s8252/at89s8252.h>
#include <inet/datatypes.H>
#include <inet/timers.h>
#include <inet/system.h>
#include <inet/ethernet.h>
#include <inet/ip.h>
#include <inet/tcp_ip.h>
UINT32 i_temp;
UINT8 i_ch;
/*------------------------------------------------------------------------
InitIrqLevels()
This function pre-sets all interrupt control registers. It can be used
to set all interrupt priorities in static applications. If this file
contains assignments to dedicated resources, verify that the
appropriate controller is used.
NOTE: value 0 sets lowest and value 0 sets highest priority.
*/
void InitIrqLevels(void)
{
//saa : To Do?
PT0 = 0; /* Set Timer 0 interrupt priority to low */
}
//#pragma inline decrement_timers
/* 16-bit timer #1 interrupt handler */
void RLDTMR1IRQHandler (void) interrupt 3/* timer1_handler, 10 msec */
{
TR1 = 0;
TH1 = T1_HIGH;
TL1 = T1_LOW;
TR1 = 1;
decrement_timers();
}
/** Time-base timer **/
void SYSTMRIRQHandler (void) interrupt 1/*timer0_handler, 1 msec*/
{
TR0 = 0;
TH0 = T0_HIGH;
TL0 = T0_LOW;
TR0 = 1;
base_timer++;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -