Skip to content

Commit 07ba569

Browse files
committed
STM32L1 USB pins addition
1 parent bb03a52 commit 07ba569

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/PeripheralPins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,11 @@ MBED_WEAK const PinMap PinMap_SPI_SSEL[] = {
228228
{PB_12, SPI_2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF5_SPI2)},
229229
{NC, NC, 0}
230230
};
231+
232+
//*** USBDEVICE ***
233+
234+
MBED_WEAK const PinMap PinMap_USB[] = {
235+
{PA_11, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF10_USB)}, // USB_DM
236+
{PA_12, USB, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF10_USB)}, // USB_DP
237+
{NC, NC, 0}
238+
};

targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/PinNames.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ typedef enum {
181181
SPI_CS = PB_6,
182182
PWM_OUT = PB_3,
183183

184-
/**** USB pins ****/
184+
/**** USB FS pins ****/
185185
USB_DM = PA_11,
186186
USB_DP = PA_12,
187187

0 commit comments

Comments
 (0)