Skip to content

Commit 6e3dc7b

Browse files
committed
STM32F1 USB pins addition
1 parent 66dea7b commit 6e3dc7b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/PeripheralNames.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ typedef enum {
6868
CAN_1 = (int)CAN1_BASE
6969
} CANName;
7070

71+
typedef enum {
72+
USB_FS = (int)USB_BASE,
73+
} USBName;
74+
7175
#ifdef __cplusplus
7276
}
7377
#endif

targets/TARGET_STM/TARGET_STM32F1/TARGET_NUCLEO_F103RB/PeripheralPins.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,3 +207,11 @@ MBED_WEAK const PinMap PinMap_CAN_TD[] = {
207207
{PB_9, CAN_1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, 10)}, // Remap CAN_TX to PB_9
208208
{NC, NC, 0}
209209
};
210+
211+
//*** USBDEVICE ***
212+
213+
MBED_WEAK const PinMap PinMap_USB_FS[] = {
214+
{PA_11, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)}, // USB_DM
215+
{PA_12, USB_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, 0)}, // USB_DP
216+
{NC, NC, 0}
217+
};

0 commit comments

Comments
 (0)