Functions
Peripheral Control and State functions
Peripheral Driver » HAL Driver » PKC » Functions

PKC Peripheral State functions. More...

## Functions
hal_pkc_state_t | hal_pkc_get_state (pkc_handle_t *p_pkc)
| Return the PKC handle state. More...
uint32_t | hal_pkc_get_error (pkc_handle_t *p_pkc)
| Return the PKC error code. More...
void | hal_pkc_set_timeout (pkc_handle_t *p_pkc, uint32_t timeout)
| Set the PKC internal process timeout value. More...
hal_status_t | hal_pkc_suspend_reg (pkc_handle_t *p_pkc)
| Suspend some registers related to PKC configuration before sleep. More...
hal_status_t | hal_pkc_resume_reg (pkc_handle_t *p_pkc)
| Restore some registers related to PKC configuration after sleep. This function must be used in conjunction with the hal_hmac_suspend_reg(). More...

## Detailed Description

PKC Peripheral State functions.

      ==============================================================================
                ##### Peripheral Control and State functions #####
      ==============================================================================
        [..]
        This subsection provides functions allowing to :
          (+) Return the PKC handle state.
          (+) Return the PKC handle error code.
          (+) Set the timeout during internal process.

## Function Documentation

## ◆ hal_pkc_get_error()

uint32_t hal_pkc_get_error | ( | pkc_handle_t * | p_pkc | ) |

Return the PKC error code.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.

Returns
  PKC error code in bitmap format

## ◆ hal_pkc_get_state()

hal_pkc_state_t hal_pkc_get_state | ( | pkc_handle_t * | p_pkc | ) |

Return the PKC handle state.

Parameters

  [in] | p_pkc | Pointer to a pkc_handle_t structure that contains the configuration information for the specified PKC.

Return values

  HAL_PKC_STATE_RESET | Peripheral not initialized.
  HAL_PKC_STATE_READY | Peripheral initialized and ready for use.
  HAL_PKC_STATE_BUSY | Peripheral in indirect mode and busy.
  HAL_PKC_STATE_ERROR | Peripheral in error.
  HAL_PKC_STATE_TIMEOUT | Peripheral in timeout.

## ◆ hal_pkc_resume_reg()

hal_status_t hal_pkc_resume_reg | ( | pkc_handle_t * | p_pkc | ) |

Restore some registers related to PKC configuration after sleep. This function must be used in conjunction with the hal_hmac_suspend_reg().

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_pkc_set_timeout()

void hal_pkc_set_timeout | ( | pkc_handle_t * | p_pkc,
|  | uint32_t | timeout
| ) |  |

Set the PKC internal process timeout value.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.
  [in] | timeout | Internal process timeout value.

## ◆ hal_pkc_suspend_reg()

hal_status_t hal_pkc_suspend_reg | ( | pkc_handle_t * | p_pkc | ) |

Suspend some registers related to PKC configuration before sleep.

Parameters

  [in] | p_pkc | Pointer to a PKC handle which contains the configuration information for the specified PKC module.

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.