Browse Source

platform: Renamed cdcacm_init -> blackmagic_usb_init

pull/443/merge
dragonmux 2 years ago
committed by Piotr Esden-Tempski
parent
commit
82bca86806
  1. 2
      src/platforms/96b_carbon/platform.c
  2. 2
      src/platforms/blackpillv2/platform.c
  3. 11
      src/platforms/common/cdcacm.c
  4. 2
      src/platforms/common/cdcacm.h
  5. 2
      src/platforms/f072/platform.c
  6. 2
      src/platforms/f3/platform.c
  7. 2
      src/platforms/f4discovery/platform.c
  8. 2
      src/platforms/hydrabus/platform.c
  9. 2
      src/platforms/launchpad-icdi/platform.c
  10. 2
      src/platforms/native/platform.c
  11. 2
      src/platforms/stlink/platform.c
  12. 2
      src/platforms/swlink/platform.c

2
src/platforms/96b_carbon/platform.c

@ -69,7 +69,7 @@ void platform_init(void)
platform_timing_init();
usbuart_init();
cdcacm_init();
blackmagic_usb_init();
}
void platform_nrst_set_val(bool assert)

2
src/platforms/blackpillv2/platform.c

@ -108,7 +108,7 @@ void platform_init(void)
platform_timing_init();
usbuart_init();
cdcacm_init();
blackmagic_usb_init();
// https://github.com/libopencm3/libopencm3/pull/1256#issuecomment-779424001
OTG_FS_GCCFG |= OTG_GCCFG_NOVBUSSENS | OTG_GCCFG_PWRDWN;

11
src/platforms/common/cdcacm.c

@ -572,17 +572,14 @@ static void cdcacm_set_config(usbd_device *dev, uint16_t wValue)
}
/* We need a special large control buffer for this device: */
uint8_t usbd_control_buffer[256];
static uint8_t usbd_control_buffer[256];
void cdcacm_init(void)
void blackmagic_usb_init(void)
{
void exti15_10_isr(void);
serial_no_read(serial_no);
usbdev = usbd_init(&USB_DRIVER, &dev_desc, &config, usb_strings,
sizeof(usb_strings)/sizeof(char *),
usbd_control_buffer, sizeof(usbd_control_buffer));
usbdev = usbd_init(&USB_DRIVER, &dev_desc, &config, usb_strings, sizeof(usb_strings) / sizeof(char *),
usbd_control_buffer, sizeof(usbd_control_buffer));
usbd_register_set_config_callback(usbdev, cdcacm_set_config);

2
src/platforms/common/cdcacm.h

@ -36,7 +36,7 @@
#define CDCACM_UART_ENDPOINT 3
#define TRACE_ENDPOINT 5
void cdcacm_init(void);
void blackmagic_usb_init(void);
/* Returns current usb configuration, or 0 if not configured. */
int cdcacm_get_config(void);
int cdcacm_get_dtr(void);

2
src/platforms/f072/platform.c

@ -84,7 +84,7 @@ void platform_init(void)
gpio_set_output_options(NRST_PORT, GPIO_OTYPE_OD,
GPIO_OSPEED_2MHZ, NRST_PIN);
platform_timing_init();
cdcacm_init();
blackmagic_usb_init();
usbuart_init();
}

2
src/platforms/f3/platform.c

@ -88,7 +88,7 @@ void platform_init(void)
/* Set up USB Pins and alternate function*/
gpio_mode_setup(GPIOA, GPIO_MODE_AF, GPIO_PUPD_NONE, GPIO11 | GPIO12);
gpio_set_af(GPIOA, GPIO_AF14, GPIO11 | GPIO12);
cdcacm_init();
blackmagic_usb_init();
usbuart_init();
}

2
src/platforms/f4discovery/platform.c

@ -107,7 +107,7 @@ void platform_init(void)
platform_timing_init();
usbuart_init();
cdcacm_init();
blackmagic_usb_init();
}
void platform_nrst_set_val(bool assert) { (void)assert; }

2
src/platforms/hydrabus/platform.c

@ -77,7 +77,7 @@ void platform_init(void)
platform_timing_init();
usbuart_init();
cdcacm_init();
blackmagic_usb_init();
}
void platform_nrst_set_val(bool assert) { (void)assert; }

2
src/platforms/launchpad-icdi/platform.c

@ -81,7 +81,7 @@ void platform_init(void)
__asm__("nop"); __asm__("nop"); __asm__("nop");
gpio_mode_setup(GPIOD_BASE, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO4|GPIO5);
usbuart_init();
cdcacm_init();
blackmagic_usb_init();
usb_enable_interrupts(USB_INT_RESET | USB_INT_DISCON |
USB_INT_RESUME | USB_INT_SUSPEND, 0xff, 0xff);

2
src/platforms/native/platform.c

@ -223,7 +223,7 @@ void platform_init(void)
SCB_VTOR = (uint32_t)&vector_table;
platform_timing_init();
cdcacm_init();
blackmagic_usb_init();
/* On hardware version 1 and 2, UART and SWD share connector pins.
* Don't enable UART if we're being debugged. */

2
src/platforms/stlink/platform.c

@ -80,7 +80,7 @@ void platform_init(void)
platform_timing_init();
if (rev > 1) /* Reconnect USB */
gpio_set(GPIOA, GPIO15);
cdcacm_init();
blackmagic_usb_init();
#ifdef SWIM_AS_UART
gpio_primary_remap(AFIO_MAPR_SWJ_CFG_FULL_SWJ,

2
src/platforms/swlink/platform.c

@ -109,7 +109,7 @@ void platform_init(void)
SCB_VTOR = (uint32_t)&vector_table;
platform_timing_init();
cdcacm_init();
blackmagic_usb_init();
usbuart_init();
}

Loading…
Cancel
Save