STM32G474xx HAL 用户手册
函数
初始化和反初始化函数
UCPD 导出函数

函数

ErrorStatus LL_UCPD_DeInit (UCPD_TypeDef *UCPDx)
 将UCPD寄存器反初始化为其默认复位值。
ErrorStatus LL_UCPD_Init (UCPD_TypeDef *UCPDx, const LL_UCPD_InitTypeDef *UCPD_InitStruct)
 根据UCPD_InitStruct中指定的参数初始化ucpd寄存器。
void LL_UCPD_StructInit (LL_UCPD_InitTypeDef *UCPD_InitStruct)
 将每个 LL_UCPD_InitTypeDef 字段设置为默认值。

函数文档

ErrorStatus LL_UCPD_DeInit ( UCPD_TypeDef *  UCPDx)

将UCPD寄存器反初始化为其默认复位值。

参数:
UCPDxucpd 实例
返回值:
一个ErrorStatus 枚举值:
  • SUCCESS: ucpd 寄存器已反初始化
  • ERROR: ucpd 寄存器未反初始化

定义位于文件 stm32g4xx_ll_ucpd.c 的第 79 行。

引用了 assert_param, LL_APB1_GRP2_DisableClock(), LL_APB1_GRP2_ForceReset(), LL_APB1_GRP2_PERIPH_UCPD1, LL_APB1_GRP2_ReleaseReset(), 和 LL_UCPD_Disable()

ErrorStatus LL_UCPD_Init ( UCPD_TypeDef *  UCPDx,
const LL_UCPD_InitTypeDef UCPD_InitStruct 
)

根据UCPD_InitStruct中指定的参数初始化ucpd寄存器。

注意:
由于ucpd配置寄存器中的某些位只能在ucpd禁用时(ucpd_CR1_SPE 位 =0)写入,因此在调用此函数之前,UCPD外设应处于禁用状态。否则,将返回 ERROR 结果。
参数:
UCPDxUCPD 实例
UCPD_InitStruct指向包含UCPD外设配置信息的 LL_UCPD_InitTypeDef 结构体的指针。
返回值:
一个ErrorStatus 枚举值。(始终返回 SUCCESS)

定义位于文件 stm32g4xx_ll_ucpd.c 的第 115 行。

引用了 assert_param, LL_UCPD_InitTypeDef::HbitClockDiv, LL_UCPD_InitTypeDef::IfrGap, LL_APB1_GRP2_EnableClock(), LL_APB1_GRP2_PERIPH_UCPD1, LL_UCPD_Disable(), LL_UCPD_InitTypeDef::psc_ucpdclk, 和 LL_UCPD_InitTypeDef::transwin

void LL_UCPD_StructInit ( LL_UCPD_InitTypeDef UCPD_InitStruct)

将每个 LL_UCPD_InitTypeDef 字段设置为默认值。

参数:
UCPD_InitStruct指向其字段将被设置为默认值的 LL_UCPD_InitTypeDef 结构体的指针。
返回值:

定义位于文件 stm32g4xx_ll_ucpd.c 的第 143 行。

引用了 LL_UCPD_InitTypeDef::HbitClockDiv, LL_UCPD_InitTypeDef::IfrGap, LL_UCPD_PSC_DIV2, LL_UCPD_InitTypeDef::psc_ucpdclk, 和 LL_UCPD_InitTypeDef::transwin