Chapter 9
9-5 PORTING THE HID CLASS TO A RTOS
The HID class uses its own RTOS layer for different purposes:
9
A locking system is used to protect a given Input report. A host can get an Input report
by sending a GET_REPORT request to the device using the control endpoint or with an
interrupt IN transfer. GET_REPORT request processing is done by the device stack while
the interrupt IN transfer is done by the application. When the application executes the
interrupt IN transfer, the Input report data is stored internally. This report data stored
will be sent via a control transfer when GET_REPORT is received. The locking system
ensures the data integrity between the Input report data storage operation done within
an application task context and the GET_REPORT request processing done within the
device stack’s internal task context.
A locking system is used to protect the Output report processing between an
application task and the device stack’s internal task when the control endpoint is used.
The application provides to the HID class a receive buffer for the Output report in the
application task context. This receive buffer will be used by the device stack’s internal
task upon reception of a SET_REPORT request. The locking system ensures the receive
buffer and related variables integrity.
A locking system is used to protect the interrupt IN endpoint access from multiple
application tasks.
A synchronization mechanism is used to implement the blocking behavior of
USBD_HID_Rd() when the control endpoint is used.
A synchronization mechanism is used to implement the blocking behavior of
USBD_HID_Wr() because the HID class internally uses the asynchronous interrupt API
for HID write.
A task is used to process periodic Input reports. Refer to section 9-6 “Periodic Input
Reports Task” on page 161 for more details about this task.
By default, Micriμm will provide an RTOS layer for both μC/OS-II and μC/OS-III. However,
it is possible to create your own RTOS layer. Your layer will need to implement the
functions listed in Table 9-9. For a complete API description, refer to Appendix D, “HID API
Reference” on page 387.
160
相关PDF资料
AD637-EVALZ BOARD EVALUATION FOR AD637
AD736-EVALZ BOARD EVALUATION FOR AD736
AD737-EVALZ BOARD EVALUATION FOR AD737
AD8007AKS-EBZ BOARD EVAL FOR AD8007AKS
AD8018ARU-EVAL BOARD EVAL FOR AD8018
AD8034ART-EBZ BOARD EVAL FOR AD8034ART
AD8040AR-EBZ BOARD EVAL FOR AD8040AR
AD8045ARD-EBZ BOARD EVAL FOR AD8045ARD
相关代理商/技术参数
AD-UCUSB-HCCDC-SPL 制造商:Analog Devices 功能描述:?C/USB HC CDC FOR CCES SINGLE PROD LIC - Virtual or Non-Physical Inventory (Software & Literature)
AD-UCUSB-HCMSC-SPL 制造商:Analog Devices 功能描述:?C/USB HC MSC FOR CCES SINGLE PROD LIC - Virtual or Non-Physical Inventory (Software & Literature)
AD-UCUSBH-MCDC-SPL 制造商:Analog Devices 功能描述:MAINTENANCE ?C/USBH CDC SINGLE PRD LIC - Virtual or Non-Physical Inventory (Software & Literature)
AD-UCUSBH-MHID-SPL 制造商:Analog Devices 功能描述:MAINTENANCE ?C/USBH HID SINGLE PRD LIC - Virtual or Non-Physical Inventory (Software & Literature)
AD-UCUSBH-MMSC-SPL 制造商:Analog Devices 功能描述:MAINTENANCE ?C/USBH MSC SINGLE PRD LIC - Virtual or Non-Physical Inventory (Software & Literature)
AD-UCUSBH-SPRD 功能描述:PRD LIC UCUSB DEV CORE CCES SGL 制造商:analog devices inc. 系列:CrossCore? Embedded Studio 零件状态:在售 类型:- 应用:- 版本:- 许可长度:- 许可 - 用户明细:- 操作系统:- 配套使用产品/相关产品:Blackfin? 处理器 媒体分发类型:- 标准包装:1
ADUM1100 制造商:AD 制造商全称:Analog Devices 功能描述:iCoupler Digital Isolator
ADUM1100AR 功能描述:IC DIGITAL ISOLATOR 1CH 8-SOIC RoHS:否 类别:隔离器 >> 数字隔离器 系列:iCoupler® 产品培训模块:IsoLoop® Isolator 标准包装:50 系列:IsoLoop® 输入 - 1 侧/2 侧:5/0 通道数:5 电源电压:3 V ~ 5.5 V 电压 - 隔离:2500Vrms 数据速率:110Mbps 传输延迟:12ns 输出类型:CMOS 封装/外壳:16-SOIC(0.154",3.90mm 宽) 供应商设备封装:16-SOIC N 包装:管件 工作温度:-40°C ~ 85°C 其它名称:390-1053-5