Prusa MINI Firmware overview
|
Macros | |
#define | __HAL_I2C_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_I2C_STATE_RESET) |
Reset I2C handle state. More... | |
#define | __HAL_I2C_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__)) |
Enable or disable the specified I2C interrupts. More... | |
#define | __HAL_I2C_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->CR2 &= (~(__INTERRUPT__))) |
#define | __HAL_I2C_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Checks if the specified I2C interrupt source is enabled or disabled. More... | |
#define | __HAL_I2C_GET_FLAG(__HANDLE__, __FLAG__) |
Checks whether the specified I2C flag is set or not. More... | |
#define | __HAL_I2C_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SR1 = ~((__FLAG__) & I2C_FLAG_MASK)) |
Clears the I2C pending flags which are cleared by writing 0 in a specific bit. More... | |
#define | __HAL_I2C_CLEAR_ADDRFLAG(__HANDLE__) |
Clears the I2C ADDR pending flag. More... | |
#define | __HAL_I2C_CLEAR_STOPFLAG(__HANDLE__) |
Clears the I2C STOPF pending flag. More... | |
#define | __HAL_I2C_ENABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 |= I2C_CR1_PE) |
Enable the I2C peripheral. More... | |
#define | __HAL_I2C_DISABLE(__HANDLE__) ((__HANDLE__)->Instance->CR1 &= ~I2C_CR1_PE) |
Disable the I2C peripheral. More... | |
#define __HAL_I2C_RESET_HANDLE_STATE | ( | __HANDLE__ | ) | ((__HANDLE__)->State = HAL_I2C_STATE_RESET) |
Reset I2C handle state.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2C where x: 1, 2, or 3 to select the I2C peripheral. |
None |
#define __HAL_I2C_ENABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->CR2 |= (__INTERRUPT__)) |
Enable or disable the specified I2C interrupts.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2C where x: 1, 2, or 3 to select the I2C peripheral. |
<strong>INTERRUPT</strong> | specifies the interrupt source to enable or disable. This parameter can be one of the following values:
|
None |
#define __HAL_I2C_DISABLE_IT | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((__HANDLE__)->Instance->CR2 &= (~(__INTERRUPT__))) |
#define __HAL_I2C_GET_IT_SOURCE | ( | __HANDLE__, | |
__INTERRUPT__ | |||
) | ((((__HANDLE__)->Instance->CR2 & (__INTERRUPT__)) == (__INTERRUPT__)) ? SET : RESET) |
Checks if the specified I2C interrupt source is enabled or disabled.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2C where x: 1, 2, or 3 to select the I2C peripheral. |
<strong>INTERRUPT</strong> | specifies the I2C interrupt source to check. This parameter can be one of the following values:
|
The | new state of INTERRUPT (TRUE or FALSE). |
#define __HAL_I2C_GET_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) |
Checks whether the specified I2C flag is set or not.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2C where x: 1, 2, or 3 to select the I2C peripheral. |
<strong>FLAG</strong> | specifies the flag to check. This parameter can be one of the following values:
|
The | new state of FLAG (TRUE or FALSE). |
#define __HAL_I2C_CLEAR_FLAG | ( | __HANDLE__, | |
__FLAG__ | |||
) | ((__HANDLE__)->Instance->SR1 = ~((__FLAG__) & I2C_FLAG_MASK)) |
Clears the I2C pending flags which are cleared by writing 0 in a specific bit.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2C where x: 1, 2, or 3 to select the I2C peripheral. |
<strong>FLAG</strong> | specifies the flag to clear. This parameter can be any combination of the following values:
|
None |
#define __HAL_I2C_CLEAR_ADDRFLAG | ( | __HANDLE__ | ) |
Clears the I2C ADDR pending flag.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2C where x: 1, 2, or 3 to select the I2C peripheral. |
None |
#define __HAL_I2C_CLEAR_STOPFLAG | ( | __HANDLE__ | ) |
Clears the I2C STOPF pending flag.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2C where x: 1, 2, or 3 to select the I2C peripheral. |
None |
#define __HAL_I2C_ENABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1 |= I2C_CR1_PE) |
Enable the I2C peripheral.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2Cx where x: 1 or 2 to select the I2C peripheral. |
None |
#define __HAL_I2C_DISABLE | ( | __HANDLE__ | ) | ((__HANDLE__)->Instance->CR1 &= ~I2C_CR1_PE) |
Disable the I2C peripheral.
<strong>HANDLE</strong> | specifies the I2C Handle. This parameter can be I2Cx where x: 1 or 2 to select the I2C peripheral. |
None |