The breaking changes here changes in header location, and changes in driver name passed down to the usb stack. Changes affect: stm32f102/f103, stm32l1, and some f3 parts * instead of the confusingly generic "usb" use the name "st_usbfs" for the USB Full speed peripheral ST provides in a variety of their stm32 products. Include directives should change as: #include <libopencm3/stm32/usb.h> => <libopencm3/stm32/st_usbfs.h> * instead of the confusingly specific "f103" name for the driver, use "st_usbfs_v1" [BREAKING_CHANGE] Instead of: usbd_init(&stm32f103_usb_driver, .....) ==> usbd_init(&st_usbfs_v1_usb_driver, .....) ==> The purpose of these changes is to reduce some confusion around naming, but primarily to prepare for the "v2" peripheral available on stm32f0/l0 and some f3 devices. Work by Frantisek Burian, Kuldeep Singh Dhaka, Robin Kreis, fenugrec and zyp on irc, and all those forgotten.
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
/* This provides unification of USB code for supported STM32F subfamilies */
|
|
|
|
/*
|
|
* This file is part of the libopencm3 project.
|
|
*
|
|
* This library is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#ifndef LIBOPENCM3_ST_USBFS_H
|
|
#define LIBOPENCM3_ST_USBFS_H
|
|
|
|
#include <libopencm3/cm3/common.h>
|
|
#include <libopencm3/stm32/memorymap.h>
|
|
|
|
#if defined(STM32F1)
|
|
# include <libopencm3/stm32/f1/st_usbfs.h>
|
|
#elif defined(STM32F3)
|
|
# include <libopencm3/stm32/f3/st_usbfs.h>
|
|
#elif defined(STM32L1)
|
|
# include <libopencm3/stm32/l1/st_usbfs.h>
|
|
#else
|
|
# error "STM32 family not defined or not supported."
|
|
#endif
|
|
|
|
#endif
|