📄 dev_ep.h
字号:
/*
** WASABI-Hot! version 1.2c
**
**
** -- copyright (c) 2001-2004 by Philips Japan, Ltd. -- All rights reserved --
**
**
** ** This code has been made to check/learn **
** ** the ISP1362/ISP1363 functionalities **
** ** Release 06-Aug-2004 **
**
** OKANO, Akifumi
**
** Application Laboratory, Mobile and Connectivity
** Semiconductors Div, Philips Japan Ltd.
** akifumi.okano@philips.com
** +81-3-3740-4668
*/
#ifndef _DEV_EP_H
#define _DEV_EP_H
/****************************************************************************/
/* includes */
/****************************************************************************/
#include "_hc_core/chap9.h"
/****************************************************************************/
/* constants */
/****************************************************************************/
#define venderID( x ) (((x)->dev_descriptor).idVendor)
#define DEFAULT_BUFFER_SIZE 8
#define MAX_DEVICE_NUM 128
#define MAX_ENDPOINT_NUM 16
#define EpOUT 0
#define EpIN 1
#define MAX_HUB_PORTS 5
/****************************************************************************/
/* global vars */
/****************************************************************************/
typedef struct epi *endpoint_info_ptr;
typedef struct epi {
unsigned short max_packet_size;
unsigned char dev_addr;
unsigned char ep_num;
unsigned char toggle;
unsigned char speed;
unsigned char direction;
unsigned char tr_type; // "Async or Iso" for PTD parameter
unsigned char transfer_type; // Ctrl, Iso, Bulk, Intrr
void *transfer_instance;
std_endpoint_descriptor endpoint_descriptor;
}
endpoint_info;
typedef struct dev {
unsigned char address;
unsigned char speed;
std_dev_descriptor dev_descriptor;
std_conf_descriptor conf_descriptor;
std_interface_descriptor interfacef_descriptor;
endpoint_info_ptr epi_ptr[ 2 ][ MAX_ENDPOINT_NUM ]; ///////// VERSION-1.2
unsigned short *string_manufacturer;
unsigned short *string_product;
unsigned short *string_serialNum;
void *class_instance_ptr;
void *protocol_instance_ptr; //Modification by hara
unsigned char topology_layer;
}
device_instance;
/****************************************************************************/
/* function prototypes */
/****************************************************************************/
device_instance *devep_create_device( unsigned char speed, unsigned char topology_layer );
unsigned char *devep_get_configuration_and_interface( device_instance *dvi_ptr );
unsigned char devep_regist_config_descriptors( device_instance *dvi_ptr, unsigned char configuration_number, unsigned char interface_number );
device_instance *devep_make_device_and_setup_ep0_connection( unsigned char speed, unsigned char topology_layer );
void devep_dispose_device( device_instance **dvi_ptr_ptr );
void devep_device_list_linitialize( void );
device_instance *devep_find_device( unsigned char address );
unsigned short devep_std_request( unsigned char *buff_ptr, device_instance *dvi_ptr, unsigned short req, unsigned short wValue, unsigned short wIndex, unsigned short *wLength );
device_instance *devep_find_class_interface( unsigned char InterfaceClassID, unsigned char search_start_address );
unsigned char devep_check_interface_class_ID( device_instance *dviPtr, unsigned char InterfaceClassID );
unsigned char devep_get_interface_class_ID( device_instance *dviPtr );
unsigned char devep_get_device_class_ID( device_instance *dviPtr );
unsigned char devep_get_interface_protocol_ID( device_instance *dviPtr ); // modification by hara
unsigned char devep_check_interface_protocol_ID( device_instance *dviPtr, unsigned char InterfaceProtocolID ); // modification by hara
#endif _DEV_EP_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -