📄 atl_mix.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 _ATL_MNG_H
#define _ATL_MNG_H
/****************************************************************************/
/* includes */
/****************************************************************************/
#include "_hc_core/dev_ep.h"
#include "_hc_core/transfer.h"
/****************************************************************************/
/* constants */
/****************************************************************************/
#define CompletionCode_NoEror 0x0
#define CompletionCode_CRC 0x1
#define CompletionCode_BitStuffing 0x2
#define CompletionCode_DataToggleMismatch 0x3
#define CompletionCode_Stall 0x4
#define CompletionCode_DeviceNotResponding 0x5
#define CompletionCode_PIDCheckFailure 0x6
#define CompletionCode_UnexpectedPID 0x7
#define CompletionCode_DataOverrun 0x8
#define CompletionCode_DataUnderrun 0x9
#define CompletionCode_BufferOverrun 0xC
#define CompletionCode_BufferUnderrun 0xD
#define Speed_Full 0
#define Speed_Low 1
#define DirectionPID_SETUP 0
#define DirectionPID_OUT 1
#define DirectionPID_IN 2
#define NoDirection_Just_Hold 3
#define SETUP DirectionPID_SETUP
#define OUT DirectionPID_OUT
#define IN DirectionPID_IN
#define HOLD NoDirection_Just_Hold
#define ATL_FULL_RW 0x0
#define ATL_SHORT_READ 0x1
#define ATL_SHORT_WRITE 0x2
#define NO_OPEN_ATL_TRANSFER_SLOT 0xFF
#define Format_Async 0
#define Format_Iso 1
/****************************************************************************/
/* types */
/****************************************************************************/
typedef struct PTD_h {
unsigned char byte[ 8 ];
}
PTD_header;
typedef struct PTD_h_p {
unsigned short ActualBytes;
unsigned char CompletionCode;
unsigned char Active;
unsigned char Toggle;
unsigned short MaxPacketSize;
unsigned char EndpointNumber;
unsigned char Last;
unsigned char Speed;
unsigned short TotalBytes;
unsigned char DirectionPID;
unsigned char Format;
unsigned char FunctionAddress;
unsigned char PollingRate;
unsigned char StartingFrame;
unsigned char Paired;
unsigned char PingPong;
}
PTD_header_param;
typedef struct _buffer_segment_info
{
unsigned short single_buffer_size; // for ISTL
unsigned short payload_size; // for INTL/ATL
unsigned short n_of_blocks; // for INTL/ATL
}
buffer_segment_info;
typedef struct _buffer_info
{
buffer_segment_info isochr;
buffer_segment_info interr;
buffer_segment_info aperio;
}
buffer_info;
/****************************************************************************/
/* global vars */
/****************************************************************************/
extern unsigned long gp_cc_logger[ 16 ];
/****************************************************************************/
/* function prototypes */
/****************************************************************************/
void atlmix_buffer_setting( unsigned short isochro_single_size, unsigned short interr_payload_size, unsigned short interr_block_size, unsigned short aperio_block_size );
unsigned char atlmix_get_open_transfer_index( unsigned char transfer_type );
void atlmix_free_transfer_index( unsigned char transfer_type, unsigned char index );
void atlmix_free_transfer( transfer_instance_ptr tip );
transfer_instance *atlmix_set_transfer( unsigned char transfer_type, unsigned char polling_rate, unsigned char index, unsigned char *buffer_ptr, unsigned short length, unsigned char direction, endpoint_info_ptr epi_ptr, void (*callback)( endpoint_info_ptr epi_ptr ) );
void atlmix_re_enable_interrupt_transfer( transfer_instance *tr_inst_ptr );
unsigned char atlmix_is_fatal_error( transfer_instance *tr_inst_ptr );
void atlmix_show_all_ptd_header( void );
void atlmix_show_ptd_header( unsigned char transfer_type, unsigned char index );
void atlmix_view_PTD( unsigned char index );
void atlmix_display_open_slot( void );
void atlmix_buffer_parameter_initialize( buffer_info *bip );
unsigned char atlmix_pp_which_buffer( void );
void atlmix_pp_link_indexes( unsigned char blk0, unsigned char blk1 );
void atlmix_pp_start( void );
void atlmix_pp_unlink_indexes( void );
unsigned char atlmix_pp_atl_active( void );
void atlmix_pp_atl_flag_mask( unsigned char flag );
unsigned char atlmix_pp_operation_active( void );
unsigned short atlmix_atl_payload_size( void );
#endif _ATL_MNG_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -