MG32L003 Standard Peripherals Firmware Library
Functions
OWIRE_Private_Functions

Functions

void OWIRE_DeInit (void)
 Deinitializes the OWIRE peripheral registers to their default reset values. More...
 
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. More...
 
void OWIRE_Cmd (FunctionalState NewState)
 Enables or disables the specified OWIRE peripheral. More...
 
void OWIRE_ITConfig (uint32_t OWIRE_IT, FunctionalState NewState)
 Enables or disables the specified OWIRE interrupts. More...
 
uint8_t OWIRE_ReadData (void)
 Read one data from DATA register. More...
 
void OWIRE_WriteData (uint8_t Data)
 Write one data to DATA register. More...
 
void OWIRE_WriteCommand (uint8_t Command)
 Write command to CMD register. More...
 
FlagStatus OWIRE_GetFlagStatus (uint32_t OWIRE_FLAG)
 Checks whether the specified the OWIRE flag is set or not. More...
 
void OWIRE_ClearFlag (uint32_t OWIRE_FLAG)
 Clears the OWIRE's pending flags. More...
 
ITStatus OWIRE_GetITStatus (uint32_t OWIRE_IT)
 Checks whether the OWIRE interrupt has occurred or not. More...
 
void OWIRE_ClearITPendingBit (uint32_t OWIRE_IT)
 Clears the OWIRE's interrupt pending bits. More...
 

Detailed Description

Function Documentation

◆ OWIRE_ClearFlag()

void OWIRE_ClearFlag ( uint32_t  OWIRE_FLAG)

Clears the OWIRE's pending flags.

Parameters
OWIRE_FLAGspecifies 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.
Return values
None

◆ OWIRE_ClearITPendingBit()

void OWIRE_ClearITPendingBit ( uint32_t  OWIRE_IT)

Clears the OWIRE's interrupt pending bits.

Parameters
OWIRE_ITSpecifies 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.
Return values
None

◆ OWIRE_Cmd()

void OWIRE_Cmd ( FunctionalState  NewState)

Enables or disables the specified OWIRE peripheral.

Parameters
NewStatenew state of the OWIRE peripheral. This parameter can be: ENABLE or DISABLE.
Return values
None

◆ OWIRE_DeInit()

void OWIRE_DeInit ( void  )

Deinitializes the OWIRE peripheral registers to their default reset values.

Parameters
None
Return values
None

◆ OWIRE_GetFlagStatus()

FlagStatus OWIRE_GetFlagStatus ( uint32_t  OWIRE_FLAG)

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

Parameters
OWIRE_FLAGSpecifies 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.
Return values
Thenew 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.

Parameters
OWIRE_ITspecifies 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.
Return values
Thenew 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.

Parameters
OWIRE_InitStructpointer to a OWIRE_InitTypeDef structure that contains the configuration information for the specified OWIRE peripheral.
Return values
None

◆ OWIRE_ITConfig()

void OWIRE_ITConfig ( uint32_t  OWIRE_IT,
FunctionalState  NewState 
)

Enables or disables the specified OWIRE interrupts.

Parameters
OWIRE_ITspecifies 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.
NewStatenew state of the OWIRE interrupts. This parameter can be: ENABLE or DISABLE.
Return values
None

◆ OWIRE_ReadData()

uint8_t OWIRE_ReadData ( void  )

Read one data from DATA register.

Return values
Theread data.

◆ OWIRE_WriteCommand()

void OWIRE_WriteCommand ( uint8_t  Command)

Write command to CMD register.

Parameters
CommandSpecifies the command to write. This parameter can be one of the following values:
  • OWIRE_COMMAND_INIT
  • OWIRE_COMMAND_TX
  • OWIRE_COMMAND_RX
Return values
None

◆ OWIRE_WriteData()

void OWIRE_WriteData ( uint8_t  Data)

Write one data to DATA register.

Parameters
DataThe data to write.
Return values
None