📄 usbio.h
字号:
/****************************************************************************/
/* TEXAS INSTRUMENTS PROPRIETARY INFORMATION */
/* */
/* (c) Copyright, Texas Instruments Incorporated, 2006. */
/* All Rights Reserved. */
/* */
/* Property of Texas Instruments Incorporated. Restricted Rights - */
/* Use, duplication, or disclosure is subject to restrictions set */
/* forth in TI's program license agreement and associated documentation. */
/****************************************************************************/
/****************************************************************************/
/* usbIO.h */
/****************************************************************************/
#ifndef __USBIO_H
#define __USBIO_H
#include "keycode.h"
/****************************************************/
/* Endpoint data structure. Contains the read and */
/* write buffers for a single endpoint. */
/****************************************************/
typedef struct
{
uint08 *send_data; /* data buffer containing send data */
uint08 *recv_data; /* data buffer containing received data */
uint08 send_total_len; /* total length of data to be sent */
uint08 send_actual_len; /* actual length of data sent so far */
uint08 recv_total_len; /* total length of data to be received */
uint08 recv_actual_len; /* actual length of data received so far */
uint08 IN_max_pkt; /* max packet size for IN direction (send) */
uint08 OUT_max_pkt; /* max packet size for OUT direction (recv) */
BOOL send_zero_byte; /* flag indicating if a zero byte write is */
/* sent to end the current data transfer */
uint08 spare1; /* for data alignment */
} USBMAIN_EP_DATA;
/****************************************************/
/* Endpoint data structure for mouse and keyboard */
/* endpoints. Data pointers set to point to small */
/* buffers which must be 4byte aligned. */
/****************************************************/
typedef struct
{
uint08 *send_data; /* data buffer containing send data */
uint08 *recv_data; /* data buffer containing received data */
uint08 send_total_len; /* total length of data to be sent */
uint08 send_actual_len; /* actual length of data sent so far */
uint08 recv_total_len; /* total length of data to be received */
uint08 recv_actual_len; /* actual length of data received so far */
uint08 IN_max_pkt; /* max packet size for IN direction (send) */
uint08 OUT_max_pkt; /* max packet size for OUT direction (recv) */
BOOL send_zero_byte; /* flag indicating if a zero byte write is */
/* sent to end the current data transfer */
uint08 interface; /* interface number */
} USBMAIN_MOUSE_DATA;
#define USBMAIN_KEYBOARD_DATA USBMAIN_MOUSE_DATA
/****************************************************/
/* USB device modes. */
/****************************************************/
#define USBMAIN_FACTORYMODE 1 /* Composer, RFC, mouse/key pass through */
#define USBMAIN_USERMODE 2 /* Mouse/key pass through */
EXEC_CC_ENUM usbIO_init( void );
void usbIO_info( TASKINFO_STRUCT *info );
void usbIO_IRReport( UIREP *pRep );
uint16 usbIO_GetCmdPacket( uint08 *pPkt, uint32 waitMs );
uint16 usbIO_PutCmdResponse( uint16 nbt, uint08 *pRsp );
uint16 usbIO_GetPeerPacket( uint08 *pPkt, uint32 waitMs );
uint16 usbIO_PutPeerResponse( uint16 nbt, uint08 *pRsp );
void usbIO_ToggleMode( void );
int08 USBMAIN_SendDataHandler(uint08 Ep);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -