How do I connect the USB library to the STM32?

I tried to find a library for stm32L152, I don't see a library for this microcontroller, there is a library for stm32f103 inside the solutions, and not separately.

How to get started with USB? Is there no USB library in one piece, how do I connect the USB library at all? Where to start? Interisuet USB-HID.

As I understand it, the question is divided into several parts. The first is to set the clock. First, you need to set the timing correctly. The second is to simply fill in the handle and activate the USB. And the third - how callbacks are organized-USB.

I tried to watch other people's projects, there are about 2 pieces of 10 files USB_.c and USB_.h accordingly, they are related to each other, it is difficult to understand what is there and what is what.

I tried to create a project through CubeMX - I don't know how to import it into emblocks.

Who faced a problem in mastering USB, what is better to read and how did you solve the problem with USB?

 0
Author: nick_n_a, 2020-10-26