⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.h

📁 Vitesse 24port gigabit Switch Source Code
💻 H
字号:
/*

    Copyright (c) 2002-2005 Vitesse Semiconductor Corporation "Vitesse".  
    All Rights Reserved.  Unpublished rights reserved under the copyright laws
    of the United States of America, other countries and international treaties.
    The software is provided without a fee. Permission to use, copy, store and 
    modify, the software and its source code is granted. Permission to integrate
    into other products, disclose, transmit and distribute the software in an
    absolute machine readable format (e.g. HEX file) is also granted. 

    The source code of the software may not be disclosed, transmitted or
    distributed without the written permission of Vitesse. The software and its
    source code may only be used in products utilizing a Vitesse VSC73xx product.
 
    This copyright notice must appear in any copy, modification, disclosure,
    transmission or distribution of the software. Vitesse retains all ownership,
    copyright, trade secret and proprietary rights in the software.  

    THIS SOFTWARE HAS BEEN PROVIDED "AS IS," WITHOUT EXPRESS OR IMPLIED WARRANTY
    INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR USE AND NON-INFRINGEMENT.

*/
#ifndef __MAIN_H__
#define __MAIN_H__

void  set_fatal_error (uchar error_id);
void  reboot (void);
void  hang (void);


/*
** Definitions that applies to the link_mode parameter used by setup_port and build_mac_config:
** The link_mode parameter uses the following bit-mapping:
**   bit 1-0 : speed (00 = 10 Mbit/s, 01 = 100 Mbit/s, 02 = 1000 Mbit/s)
**   bit 4   : duplex mode (0 = HDX, 1 = FDX)
**   bit 5   : enable pause frames (0 = disabled, 1 = enabled)
**   bit 7   : internal loopback on PHYs (for loopback test only).
**
** Setting all bits to 1 is used to indicate that there is no link.
** For convenience bits 1-0 are coded like PHYs do.
*/
#define LINK_MODE_SPEED_10     0
#define LINK_MODE_SPEED_100    1
#define LINK_MODE_SPEED_1000   2

#define LINK_MODE_SPEED_MASK   0x03
#define LINK_MODE_FDX_MASK     0x10
#define LINK_MODE_PAUSE_MASK   0x20


#define LINK_MODE_INT_LOOPBACK 0X80

#define LINK_MODE_DOWN         0xFF

#define LINK_MODE_FDX_10       (LINK_MODE_SPEED_10 | LINK_MODE_FDX_MASK)
#define LINK_MODE_HDX_10       (LINK_MODE_SPEED_10)

#define LINK_MODE_FDX_100      (LINK_MODE_SPEED_100 | LINK_MODE_FDX_MASK)
#define LINK_MODE_HDX_100      (LINK_MODE_SPEED_100)

#define LINK_MODE_FDX_1000     (LINK_MODE_SPEED_1000 | LINK_MODE_FDX_MASK)

#define LINK_MODE_FDX_AND_PAUSE_MASK (LINK_MODE_FDX_MASK | LINK_MODE_PAUSE_MASK)

#define LINK_MODE_SPEED_AND_FDX_MASK (LINK_MODE_SPEED_MASK | LINK_MODE_FDX_MASK)


/*
** Error ids
*/
#define MIIM_FAILURE          2
#define ARBITER_EMPTY_FAILURE 3
#define MACTAB_FAILURE        4
#define H2_GENERAL_FAILURE    5
#define PHY_GENERAL_FAILURE   6

#endif














⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -