欢迎访问ic37.com |
会员登录 免费注册
发布采购

AN295 参数 Datasheet PDF下载

AN295图片预览
型号: AN295
PDF下载: 下载PDF文件 查看货源
内容描述: USB音频类教程 [USB AUDIO CLASS TUTORIAL]
分类和应用: 光电二极管
文件页数/大小: 18 页 / 244 K
品牌: SILICON [ SILICON ]
 浏览型号AN295的Datasheet PDF文件第10页浏览型号AN295的Datasheet PDF文件第11页浏览型号AN295的Datasheet PDF文件第12页浏览型号AN295的Datasheet PDF文件第13页浏览型号AN295的Datasheet PDF文件第14页浏览型号AN295的Datasheet PDF文件第15页浏览型号AN295的Datasheet PDF文件第17页浏览型号AN295的Datasheet PDF文件第18页  
AN295  
4.1.17. Report Descriptor  
The HID interface defines exactly how data is formatted using a Report Descriptor. The Report Descriptor defines  
each report using a template shown here:  
0x85, 0x__,  
0x75, 0x__,  
0x95, 0x__,  
0x09, 0x01,  
0xB1, 0x__,  
// REPORT_ID (__)  
// REPORT_COUNT (__)  
// REPORT_SIZE (__)  
// USAGE (Vendor Usage 1)  
// INPUT/OUTPUT/FEATURE (Data,Var,Abs)  
0x85, 0x__,  
// REPORT_ID (__)  
These two bytes define the Report’s ID. During operations communication, the host requests or transmits reports  
using this unique Report ID.  
0x75, 0x__,  
0x95, 0x__,  
// REPORT_COUNT (__)  
// REPORT_SIZE (__)  
These two values define report data type. REPORT_COUNTindicates how many data items the report contains, and  
REPORT_SIZEindicates the size of each data item in terms of bits. The buffer size of the report, in units of bits, can  
be found by multiplying REPORT_COUNT and REPORT_SIZE. A report's buffer size can be as large as the HID  
endpoint’s maximum size, which is set in the Endpoint Descriptor.  
0x09, 0x01,  
// USAGE (Vendor Usage 1)  
This value gives the host information about how to process the data contained in the Report. In this case, the data  
is tagged as vendor defined, and so the host system assumes that a user-level application will process the data.  
0xB1/0x91, 0x02,  
// FEATURE/OUTPUT (Data,Var,Abs)  
This value is set to ‘0x91’ for output reports and 0xB1 for feature reports. Output reports travel from host to device,  
and feature reports can travel from either host to device or device to host.  
4.2. Endpoint 3 Handler  
Figure 1 shows the path that data travels from the device to the host system.  
The isochronous endpoint handler, located in the file F320_ToneGenerator.c, takes samples from the 256-element  
sine wave table and writes them to the Endpoint 3 buffer. The handler writes samples to the buffer inside a loop  
with the following termination condition::  
(FIFO_INDEX < (48*4))  
The host requests a packet from the isochronous endpoint every USB frame, which occurs once every millisecond.  
For 48,000 samples to be transmitted every second, 48 samples must be transmitted every 1-millisecond frame.  
Every sample requires four bytes, as the left and right channel each require two bytes for their 16-bit values. A  
pointer to the sine wave table increments with every loop iteration and wraps around to the first element of the table  
at the start of every period of sine wave output.  
16  
Rev. 0.1