2022年11月1日

摘要: hid设备: 阅读全文
posted @ 2022-11-01 19:48 lydstory 阅读(18) 评论(0) 推荐(0)
摘要: /* Function Prototypes: */ /** Main function to initialize and start the USB interface. Once active, the USB interface will * allow for device connect 阅读全文
posted @ 2022-11-01 19:34 lydstory 阅读(42) 评论(0) 推荐(0)
摘要: enum USB_Modes_t { USB_MODE_None = 0, /**< Indicates that the controller is currently not initialized in any specific USB mode. */ USB_MODE_Device = 1 阅读全文
posted @ 2022-11-01 19:29 lydstory 阅读(104) 评论(0) 推荐(0)
摘要: 文件universal serial Bus HID Usage Table完整列出所有的usage pages(用途类页)和usage ID(用途识别名),使用者必须遵照文件的规范来声明操作的用途。该文件的附录A有十多个报告描述符的范例 阅读全文
posted @ 2022-11-01 16:20 lydstory 阅读(104) 评论(0) 推荐(0)
摘要: USB/HID设备报告描述符详解 (3) USB描述符即USB设备的信息,系统设备列举所要执行的工作之一,即是取得这些有关于设各的相关信息,之后设备才能被系统识别使用。 在图的描述符中,设备描述符(device descriptor)、配置描述符(configurationdescriptor)、接 阅读全文
posted @ 2022-11-01 16:00 lydstory 阅读(1353) 评论(0) 推荐(0)
摘要: usb report description usb report description usb report description 调整report description 阅读全文
posted @ 2022-11-01 15:48 lydstory 阅读(37) 评论(0) 推荐(0)
摘要: 结构体中的冒号表示位域。位域出现的原因是由于某些信息的存储表示只需要几个bit位就可以表示而不需要一个完整的字节,同时也是为了节省存储空间和方便处理。其表示形式为:struct 位域结构名{ 类型说明符 位域名:位域长度}例如:struct bit_struct{ int bit1:3; int b 阅读全文
posted @ 2022-11-01 15:46 lydstory 阅读(406) 评论(0) 推荐(0)
摘要: ST-Link与stm32必须全部启动连接 debug ST-Link与stm32必须全部启动连接 debug ST-Link与stm32必须全部启动连接 debug 阅读全文
posted @ 2022-11-01 03:34 lydstory 阅读(26) 评论(0) 推荐(0)
摘要: #include "stdafx.h" #include <iostream> using namespace std; typedef unsigned char uint8_t; /* Following USB Device status */ typedef enum { USBD_OK = 阅读全文
posted @ 2022-11-01 03:24 lydstory 阅读(67) 评论(0) 推荐(0)
摘要: https://www.freesion.com/article/9414775664/ 阅读全文
posted @ 2022-11-01 01:56 lydstory 阅读(22) 评论(0) 推荐(0)
摘要: /*** @brief PCD State structure definition*/typedef enum{ HAL_PCD_STATE_RESET = 0x00, HAL_PCD_STATE_READY = 0x01, HAL_PCD_STATE_ERROR = 0x02, HAL_PCD_ 阅读全文
posted @ 2022-11-01 01:55 lydstory 阅读(16) 评论(0) 推荐(0)
摘要: /** * @brief USB Initialization Structure definition */typedef struct{ uint32_t dev_endpoints; /*!< Device Endpoints number. This parameter depends on 阅读全文
posted @ 2022-11-01 01:29 lydstory 阅读(68) 评论(0) 推荐(0)
摘要: 主机环境:Windows 7 SP1 开发环境:MDK5.14 目标板:STM32F103C8T6 开发库:STM32F1Cube库和STM32_USB_Device_Library 现在来分析哈USB器件库代码,先来看usbd_core文件,其头文件只有一些函数声明,没啥可说的,只有一点,之前分析 阅读全文
posted @ 2022-11-01 01:01 lydstory 阅读(1088) 评论(0) 推荐(0)
摘要: /** @defgroup USBD_DESC_Private_Variables USBD_DESC_Private_Variables * @brief Private variables. * @{ */USBD_DescriptorsTypeDef FS_Desc ={ USBD_FS_De 阅读全文
posted @ 2022-11-01 00:45 lydstory 阅读(87) 评论(0) 推荐(0)
摘要: STM32 USB协议和代码分析 一 前言: usb接口是一个非常重要的通信接口,它的协议是有些复杂的。作为一个工程师,对usb协议和代码进行分析,是一个必备的素质和技能。最近一个项目用到了USB存储接口,花了不少时间把项目做完之后,还是有不少心得体会的。这里做一个梳理和总结,希望能给人乘凉。 二 阅读全文
posted @ 2022-11-01 00:42 lydstory 阅读(536) 评论(0) 推荐(0)
摘要: if (USBD_RegisterClass(&hUsbDeviceFS, &USBD_CUSTOM_HID) != USBD_OK) { Error_Handler(); } USBD_ClassTypeDef USBD_CUSTOM_HID ={ USBD_CUSTOM_HID_Init, US 阅读全文
posted @ 2022-11-01 00:41 lydstory 阅读(212) 评论(0) 推荐(0)
摘要: /* Following USB Device status */ typedef enum { USBD_OK = 0U, USBD_BUSY, USBD_FAIL, } USBD_StatusTypeDef; int main() { USBD_StatusTypeDef usbdok = US 阅读全文
posted @ 2022-11-01 00:37 lydstory 阅读(38) 评论(0) 推荐(0)

导航