📄 usr_func.h
字号:
/* * Copyright 2002, QNX Software Systems Ltd. Unpublished Work All Rights * Reserved. * * This source code contains confidential information of QNX Software Systems * Ltd. (QSSL). Any use, reproduction, modification, disclosure, distribution * or transfer of this software, or any software which includes or is based * upon any of this code, is only permitted under the terms of the QNX * Confidential Source License version 1.0 (see licensing.qnx.com for details) * or as otherwise expressly authorized by a written license agreement from * QSSL. For more information, please email licensing@qnx.com. *//* @(#)usr_func.h 6.1 5/13/97 08:54:30 *//*-----------------------------------------------------------------------------+|| This source code has been made available to you by IBM on an AS-IS| basis. Anyone receiving this source is licensed under IBM| copyrights to use it in any way he or she deems fit, including| copying it, modifying it, compiling it, and redistributing it either| with or without modifications. No license under IBM patents or| patent applications is to be implied by the copyright license.|| Any user of this software should understand that IBM cannot provide| technical support for this software and will not be responsible for| any consequences resulting from the use of this software.|| Any person who transfers this source code or any derivative work| must include the IBM copyright notice, this paragraph, and the| preceding two paragraphs in the transferred software.|| COPYRIGHT I B M CORPORATION 1995| LICENSED MATERIAL - PROGRAM PROPERTY OF I B M| 18 Aug 97 Added _callxlc for QNX -NL| Added alternate board version number for old images -NL+-----------------------------------------------------------------------------*/#define ACCESS_READ 'R'#define ACCESS_WRITE 'W'#define RELOC_INST 'I'#define RELOC_DATA 'D'/* function pointer addresses */#define SEND_ENET_FP 0xFFFE0800#define ENET_REGISTER_FP 0xFFFE0900#define ENET_ISTHERE_FP 0xFFFE0A00#define ENET_INIT_FP 0xFFFE0B00#define GETCHAR_FP 0xFFFE0B10#define S1PUTCHAR_FP 0xFFFE0B20#define SEND_BOOTDEV_FP 0xFFFE0B30#define REG_BOOTDEV_FP 0xFFFE0B40#define BOARD_CFG_FP 0xFFFE0B50#define MMU_REGISTER_FP 0xFFFE0B60/* This structure can be used in conjunction with the ROM Monitor function *//* get_board_cfg() to read configuration data associated with the eval *//* board. This structure contains a version number for the structure (in *//* case it ever changes), a version number for the level of the ROM Monitor*//* installed, the size of DRAM found to be installed on the board, *//* the processor speed, and the bus speed. */#define BOARD_CFG_STRUCT_VER "1.3"/* alternate version number, for which mem_size is still valid -NL*/#define BOARD_CFG_STRUCT_VER_ALT "1.1"struct board_cfg_data { unsigned char usr_config_ver[4]; unsigned char rom_sw_ver[30]; unsigned int mem_size; unsigned char mac_address[6]; unsigned int processor_speed; unsigned int bus_speed;};/* Function to access data from the ROM Monitor -NL */int _callxlc(int,...);/* This function reads the configuration data associated with the board. */extern struct board_cfg_data * (*get_board_cfg)();/* This function allows sending of an IP packet over the device that was *//* used to load the application. This may be either the Ethernet or the *//* second serial port. */extern int (*send_packet_on_bootdev)(char *p, int len);/* This function is used to register a function that will be called when *//* an IP packet is received by the ROM monitor (over the boot device) that *//* is for Son of HIF. */extern int (*sh_register)(void (*recv_function)(char *p, unsigned long len));/* This function allows you to send a frame over the Ethernet. */extern int (*enet_send_macframe)(char *frame, int frame_len);/* This function allows you to register an IP address for Ethernet and to *//* specify a function to be called when a frame arrives for that address. */extern int (*enet_register)(void (*recv_function)(char *frame, unsigned long frame_len), unsigned long ip_addr);/* This function will determine if the Ethernet chip present. */extern int (*enetisThere)(unsigned long *ip_src, unsigned long *ip_dst, int *parmp);/* This function can be used to initialize the Ethernet. */extern int (*enetInit)(unsigned long *srcaddr, unsigned long *dstaddr, int *parmp);/* This function will read one character from the keyboard buffer *//* over the first serial port. */extern int (*getchar)();/* This function will write one character to the first serial port. */extern void (*s1putchar)(char c);/* This function allows you to register a function that can be used to read *//* and write memory when translation is enabled. If a function has been *//* registered, it will be used to access memory during debug. */extern int (*mmu_register)(int (*trans_function) (unsigned long vaddr, int request_len, char * io_buf, char access_type, char reloc_type));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -