MG32L003 Standard Peripherals Firmware Library

函数
OWIRE_Private_Functions
MG32L003_StdPeriph_Driver » OWIRE

## 函数
void | OWIRE_DeInit (void)
| Deinitializes the OWIRE peripheral registers to their default reset values. 更多...
void | OWIRE_Init (OWIRE_InitTypeDef *OWIRE_InitStruct)
| Initializes the OWIRE mode according to the specified parameters in the OWIRE_InitTypeDef and create the associated handler. 更多...
void | OWIRE_Cmd (FunctionalState NewState)
| Enables or disables the specified OWIRE peripheral. 更多...
void | OWIRE_ITConfig (uint32_t OWIRE_IT, FunctionalState NewState)
| Enables or disables the specified OWIRE interrupts. 更多...
uint8_t | OWIRE_ReadData (void)
| Read one data from DATA register. 更多...
void | OWIRE_WriteData (uint8_t Data)
| Write one data to DATA register. 更多...
void | OWIRE_WriteCommand (uint8_t Command)
| Write command to CMD register. 更多...
FlagStatus | OWIRE_GetFlagStatus (uint32_t OWIRE_FLAG)
| Checks whether the specified the OWIRE flag is set or not. 更多...
void | OWIRE_ClearFlag (uint32_t OWIRE_FLAG)
| Clears the OWIRE's pending flags. 更多...
ITStatus | OWIRE_GetITStatus (uint32_t OWIRE_IT)
| Checks whether the OWIRE interrupt has occurred or not. 更多...
void | OWIRE_ClearITPendingBit (uint32_t OWIRE_IT)
| Clears the OWIRE's interrupt pending bits. 更多...

## 详细描述

## 函数说明

## ◆ OWIRE_ClearFlag()

void OWIRE_ClearFlag | ( | uint32_t | OWIRE_FLAG | ) |

Clears the OWIRE's pending flags.

参数

  OWIRE_FLAG | specifies the flag bit to clear. This parameter can be any combination of the following values: OWIRE_FLAG_ACKERROR: Slave answer error flag. OWIRE_FLAG_INITDONE: Initialization completion flag. OWIRE_FLAG_TXDONE: Send complete flag. OWIRE_FLAG_RXDONE: Receiving complete flag.

返回值

  None |

## ◆ OWIRE_ClearITPendingBit()

void OWIRE_ClearITPendingBit | ( | uint32_t | OWIRE_IT | ) |

Clears the OWIRE's interrupt pending bits.

参数

  OWIRE_IT | Specifies the OWIRE's interrupt to clear. This parameter can be one of the following values: OWIRE_IT_ACKERROR: Slave answer error interrupt flag. OWIRE_IT_INITDONE: Initialization completion interrupt flag. OWIRE_IT_TXDONE: Send complete interrupt flag. OWIRE_IT_RXDONE: Receiving complete interrupt flag.

返回值

  None |

## ◆ OWIRE_Cmd()

void OWIRE_Cmd | ( | FunctionalState | NewState | ) |

Enables or disables the specified OWIRE peripheral.

参数

  NewState | new state of the OWIRE peripheral. This parameter can be: ENABLE or DISABLE.

返回值

  None |

## ◆ OWIRE_DeInit()

void OWIRE_DeInit | ( | void |  | ) |

Deinitializes the OWIRE peripheral registers to their default reset values.

参数

  None |

返回值

  None |

## ◆ OWIRE_GetFlagStatus()

FlagStatus OWIRE_GetFlagStatus | ( | uint32_t | OWIRE_FLAG | ) |

Checks whether the specified the OWIRE flag is set or not.

参数

  OWIRE_FLAG | Specifies the OWIRE flag to check. This parameter can be one of the following values: OWIRE_FLAG_ACKERROR: Slave answer error flag. OWIRE_FLAG_INITDONE: Initialization completion flag. OWIRE_FLAG_TXDONE: Send complete flag. OWIRE_FLAG_RXDONE: Receiving complete flag.

返回值

  The | new state of OWIRE_FLAG (SET or RESET).

## ◆ OWIRE_GetITStatus()

ITStatus OWIRE_GetITStatus | ( | uint32_t | OWIRE_IT | ) |

Checks whether the OWIRE interrupt has occurred or not.

参数

  OWIRE_IT | specifies the OWIRE interrupt source to check. This parameter can be one of the following values: OWIRE_IT_ACKERROR: Slave answer error interrupt flag. OWIRE_IT_INITDONE: Initialization completion interrupt flag. OWIRE_IT_TXDONE: Send complete interrupt flag. OWIRE_IT_RXDONE: Receiving complete interrupt flag.

返回值

  The | new state of the OWIRE_IT(SET or RESET).

## ◆ OWIRE_Init()

void OWIRE_Init | ( | OWIRE_InitTypeDef * | OWIRE_InitStruct | ) |

Initializes the OWIRE mode according to the specified parameters in the OWIRE_InitTypeDef and create the associated handler.

参数

  OWIRE_InitStruct | pointer to a OWIRE_InitTypeDef structure that contains the configuration information for the specified OWIRE peripheral.

返回值

  None |

## ◆ OWIRE_ITConfig()

void OWIRE_ITConfig | ( | uint32_t | OWIRE_IT,
|  | FunctionalState | NewState
| ) |  |

Enables or disables the specified OWIRE interrupts.

参数

  OWIRE_IT | specifies the OWIRE interrupts sources to be enabled or disabled. This parameter can be any combination of the following values: OWIRE_IT_ACKERROR: Slave answer error interrupt flag. OWIRE_IT_INITDONE: Initialization completion interrupt flag. OWIRE_IT_TXDONE: Send complete interrupt flag. OWIRE_IT_RXDONE: Receiving complete interrupt flag.
  NewState | new state of the OWIRE interrupts. This parameter can be: ENABLE or DISABLE.

返回值

  None |

## ◆ OWIRE_ReadData()

uint8_t OWIRE_ReadData | ( | void |  | ) |

Read one data from DATA register.

返回值

  The | read data.

## ◆ OWIRE_WriteCommand()

void OWIRE_WriteCommand | ( | uint8_t | Command | ) |

Write command to CMD register.

参数

  Command | Specifies the command to write. This parameter can be one of the following values: OWIRE_COMMAND_INIT OWIRE_COMMAND_TX OWIRE_COMMAND_RX

返回值

  None |

## ◆ OWIRE_WriteData()

void OWIRE_WriteData | ( | uint8_t | Data | ) |

Write one data to DATA register.

参数

  Data | The data to write.

返回值

  None |