MG32F10x Standard Peripherals Firmware Library
模块 | 函数

SFM driver modules 更多...

模块

 SFM_Exported_Constants
 
 SFM_Private_Functions
 

函数

void CRC_SFM_DeInit (void)
 Deinitializes the CRC and SFM peripheral registers to their default reset values. 更多...
 
uint32_t SFM_ComputeBit1Number (uint32_t Data)
 Returns the number of bit 1 in a word(32-bit). 更多...
 
void SFM_ExpandBits (uint32_t Data, uint32_t *pBuffer, uint32_t ExpandRate)
 Expand a word(32-bit) with specified rate. 更多...
 
void SFM_USBPort_DetectConfig (uint32_t SFM_USBP_DETECT, FunctionalState NewState)
 Configure the USB Port state detect function. 更多...
 
FlagStatus SFM_USBPort_GetFlagStatus (uint32_t SFM_USBP_FLAG)
 Checks whether the specified USB Port flag is set or not. 更多...
 
void SFM_USBPort_ClearFlag (uint32_t SFM_USBP_FLAG)
 Clears the USB Port's pending flags. 更多...
 

详细描述

SFM driver modules

函数说明

◆ CRC_SFM_DeInit()

void CRC_SFM_DeInit ( void  )

Deinitializes the CRC and SFM peripheral registers to their default reset values.

返回
None

◆ SFM_ComputeBit1Number()

uint32_t SFM_ComputeBit1Number ( uint32_t  Data)

Returns the number of bit 1 in a word(32-bit).

参数
DataThe input data.
返回
The number of bit 1 in a word(32-bit).

◆ SFM_ExpandBits()

void SFM_ExpandBits ( uint32_t  Data,
uint32_t *  pBuffer,
uint32_t  ExpandRate 
)

Expand a word(32-bit) with specified rate.

参数
DataThe input data.
pBufferThe buffer to save result.
ExpandRatespecifies the expand rate (1 ~ 8).
返回
None.

◆ SFM_USBPort_ClearFlag()

void SFM_USBPort_ClearFlag ( uint32_t  SFM_USBP_FLAG)

Clears the USB Port's pending flags.

参数
SFM_USBP_FLAGspecifies the flag to clear. This parameter can be any combination of the following values:
  • SFM_USBP_FLAG_SE0
  • SFM_USBP_FLAG_JSTAT
  • SFM_USBP_FLAG_KSTAT
  • SFM_USBP_FLAG_SE1
返回
None

◆ SFM_USBPort_DetectConfig()

void SFM_USBPort_DetectConfig ( uint32_t  SFM_USBP_DETECT,
FunctionalState  NewState 
)

Configure the USB Port state detect function.

参数
SFM_USBP_DETECTThis parameter can be any combination of the following values:
  • SFM_USBP_DETECT_SE0
  • SFM_USBP_DETECT_JSTAT
  • SFM_USBP_DETECT_KSTAT
  • SFM_USBP_DETECT_SE1
NewStatenew state of the USB Port state detect function. This parameter can be: ENABLE or DISABLE.
返回
None

◆ SFM_USBPort_GetFlagStatus()

FlagStatus SFM_USBPort_GetFlagStatus ( uint32_t  SFM_USBP_FLAG)

Checks whether the specified USB Port flag is set or not.

参数
SFM_USBP_FLAGspecifies the flag to check. This parameter can be one of the following values:
  • SFM_USBP_FLAG_SE0
  • SFM_USBP_FLAG_JSTAT
  • SFM_USBP_FLAG_KSTAT
  • SFM_USBP_FLAG_SE1
返回
The new state of SFM_USBP_FLAG (SET or RESET).