usb: extract ST USB FS peripheral core. [BREAKING CHANGE]

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.
This commit is contained in:
Karl Palsson
2015-10-02 00:41:25 +00:00
parent 1480c6ee4b
commit e121243ce2
15 changed files with 430 additions and 171 deletions

View File

@@ -57,7 +57,7 @@ int main(void)
rcc_periph_clock_enable(RCC_OTGFS);
usbd_device *usbd_dev = gadget0_init(&stm32f103_usb_driver, "stm32f103-generic");
usbd_device *usbd_dev = gadget0_init(&st_usbfs_v1_usb_driver, "stm32f103-generic");
ER_DPRINTF("bootup complete\n");
gpio_clear(GPIOC, GPIO13);

View File

@@ -57,7 +57,7 @@ int main(void)
gpio_mode_setup(GPIOB, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, GPIO1);
gpio_set(GPIOB, GPIO1);
usbd_device *usbd_dev = gadget0_init(&stm32f103_usb_driver, "stm32l1-generic");
usbd_device *usbd_dev = gadget0_init(&st_usbfs_v1_usb_driver, "stm32l1-generic");
ER_DPRINTF("bootup complete\n");
gpio_clear(GPIOB, GPIO1);