stm32fsdev: set dcd_connect API definitions to strong, Modify documentation.
This commit is contained in:
+2
-2
@@ -107,8 +107,8 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num);
|
||||
void dcd_remote_wakeup(uint8_t rhport);
|
||||
|
||||
// Connect or disconnect D+/D- line pull-up resistor.
|
||||
// Defined as weak in dcd source if MCU has internal pull-up.
|
||||
// Can be strongly defined in BSP.
|
||||
// Defined in dcd source if MCU has internal pull-up.
|
||||
// Otherwise, may be defined in BSP.
|
||||
void dcd_connect(uint8_t rhport) TU_ATTR_WEAK;
|
||||
void dcd_disconnect(uint8_t rhport) TU_ATTR_WEAK;
|
||||
|
||||
|
||||
@@ -243,17 +243,17 @@ void dcd_init (uint8_t rhport)
|
||||
// Data-line pull-up is left disconnected.
|
||||
}
|
||||
|
||||
// Define only on MCU with internal pull-up so BSP can override (needed on MCU without internal pull-up)
|
||||
// Define only on MCU with internal pull-up. BSP can define on MCU without internal PU.
|
||||
#if defined(USB_BCDR_DPPU)
|
||||
|
||||
TU_ATTR_WEAK
|
||||
// Disable internal D+ PU
|
||||
void dcd_disconnect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
USB->BCDR &= ~(USB_BCDR_DPPU);
|
||||
}
|
||||
|
||||
TU_ATTR_WEAK
|
||||
// Enable internal D+ PU
|
||||
void dcd_connect(uint8_t rhport)
|
||||
{
|
||||
(void) rhport;
|
||||
|
||||
Reference in New Issue
Block a user