AnsweredAssumed Answered


Question asked by lisper on Aug 5, 2016
Latest reply on Aug 5, 2016 by lisper
I have an STM32F416 embedded in a USB device that I want to act like a keyboard device when plugged in to a PC.  I'm using the STM32Cube USB device library and the UM1734 documentation.  In the documentation it says:

"The HID stack is initialized by calling the USBD_HID_Init()," [sic]

So I tried calling that function and got both an undeclared function warning and a link error.  When I looked at the source code for the library, I found that the USBD_HID_Init function was not declared in usbd_hid.h.  Moreover, in usbd_hid.c the function is declared:

static uint8_t  USBD_HID_DeInit (USBD_HandleTypeDef *pdev, 

                                 uint8_t cfgidx)

So this function cannot be called externally.  There seems to be a total mismatch between the documentation and the code here.  What am I missing?