data_buff[0]=0x01; data_buff[1]=0x00; data_buff[2]=0x00; // USBD_CUSTOM_HID_SendReport(&hUsbDeviceFS, data_buff, CUSTOM_HID_EPIN_SIZE); // HAL_GPIO_WritePin(LED1_GPIO_Port, LED2_Pin, GPIO_PIN_SET); // HAL_Delay(1000); /*delay 100ms to power up*/ // HAL_GPIO_WritePin(LED1_GPIO_Port, LED2_Pin, GPIO_PIN_RESET); // data_buff[0]=0x02; // data_buff[1]=0xaa; // USBD_CUSTOM_HID_SendReport(&hUsbDeviceFS, data_buff, CUSTOM_HID_EPIN_SIZE); /* USER CODE BEGIN 3 */
标签:SendReport,CUSTOM,USBD,HID,GPIO,data,buff From: https://www.cnblogs.com/hshy/p/16861736.html