WB32F10x Standard Peripherals Firmware Library

Modules | Functions
SFM
WB32F10x_StdPeriph_Driver

SFM driver modules. More...

## Modules
| SFM_Exported_Constants
| SFM_Private_Functions

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

## Detailed Description

SFM driver modules.

## Function Documentation

## ◆ CRC_SFM_DeInit()

void CRC_SFM_DeInit | ( | void |  | ) |

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

Returns
  None

## ◆ SFM_ComputeBit1Number()

uint32_t SFM_ComputeBit1Number | ( | uint32_t | Data | ) |

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

Parameters

  Data | The input data.

Returns
  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.

Parameters

  Data | The input data.
  pBuffer | The buffer to save result.
  ExpandRate | specifies the expand rate (1 ~ 8).

Returns
  None.

## ◆ SFM_USBPort_ClearFlag()

void SFM_USBPort_ClearFlag | ( | uint32_t | SFM_USBP_FLAG | ) |

Clears the USB Port's pending flags.

Parameters

  SFM_USBP_FLAG | specifies 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

Returns
  None

## ◆ SFM_USBPort_DetectConfig()

void SFM_USBPort_DetectConfig | ( | uint32_t | SFM_USBP_DETECT,
|  | FunctionalState | NewState
| ) |  |

Configure the USB Port state detect function.

Parameters

  SFM_USBP_DETECT | This 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
  NewState | new state of the USB Port state detect function. This parameter can be: ENABLE or DISABLE.

Returns
  None

## ◆ SFM_USBPort_GetFlagStatus()

FlagStatus SFM_USBPort_GetFlagStatus | ( | uint32_t | SFM_USBP_FLAG | ) |

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

Parameters

  SFM_USBP_FLAG | specifies 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

Returns
  The new state of SFM_USBP_FLAG (SET or RESET).