Skip to content

Commit ce6bb3d

Browse files
committed
STM32L1 USB pins addition
1 parent b2bae03 commit ce6bb3d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

targets/TARGET_STM/TARGET_STM32L1/TARGET_NUCLEO_L152RE/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ typedef enum {
7474
PWM_11 = (int)TIM11_BASE
7575
} PWMName;
7676

77+
typedef enum {
78+
USB_FS = (int)USB_BASE,
79+
} USBName;
80+
7781
#ifdef __cplusplus
7882
}
7983
#endif

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_FS[] = {
235+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DM
236+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_DP
237+
{NC, NC, 0}
238+
};

0 commit comments

Comments
 (0)