Functions
Initialization and de-initialization Functions
Peripheral Driver » HAL Driver » BOD » Functions

Initialization and Configuration functions. More...

## Functions
hal_status_t | hal_bod_init (bod_handle_t *p_bod)
| Initialize the BOD according to the specified parameters in the bod_init_t and initialize the associated handle. More...
hal_status_t | hal_bod_deinit (bod_handle_t *p_bod)
| De-initialize the BOD peripheral. More...
void | hal_bod_msp_init (bod_handle_t *p_bod)
| Initialize the BOD MSP. More...
void | hal_bod_msp_deinit (bod_handle_t *p_bod)
| De-initialize the BOD MSP. More...
void | hal_bod_fedge_callback (bod_handle_t *p_bod)
| BOD fall edge callback. More...
void | hal_bod_redge_callback (bod_handle_t *p_bod)
| BOD rise edge callback. More...
void | hal_bod_fedge_irq_handler (bod_handle_t *p_bod)
| Handle BOD fall edge interrupt request. More...
void | hal_bod_redge_irq_handler (bod_handle_t *p_bod)
| Handle BOD rise edge interrupt request. More...
hal_status_t | hal_bod_enable (bod_handle_t *p_bod, uint8_t enable)
| enable bod More...
hal_status_t | hal_bod2_enable (bod_handle_t *p_bod, uint8_t enable)
| enable bod2 More...
hal_status_t | hal_bod2_set_level (bod_handle_t *p_bod, uint8_t level)
| Set BOD2 control level. More...
hal_status_t | hal_bod_static_mode_enable (bod_handle_t *p_bod, uint8_t enable)
| enable/disable static mode More...

## Detailed Description

Initialization and Configuration functions.

## Function Documentation

## ◆ hal_bod2_enable()

hal_status_t hal_bod2_enable | ( | bod_handle_t * | p_bod,
|  | uint8_t | enable
| ) |  |

enable bod2

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.
  [in] | enable | bod2 enable flag. the value can be HAL_BOD2_ENABLE or HAL_BOD2_DISABLE

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_bod2_set_level()

hal_status_t hal_bod2_set_level | ( | bod_handle_t * | p_bod,
|  | uint8_t | level
| ) |  |

Set BOD2 control level.

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.
  [in] | level | the level of bod2 control.the value range between 0x0 ~ 0xF

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_bod_deinit()

hal_status_t hal_bod_deinit | ( | bod_handle_t * | p_bod | ) |

De-initialize the BOD peripheral.

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD 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_bod_enable()

hal_status_t hal_bod_enable | ( | bod_handle_t * | p_bod,
|  | uint8_t | enable
| ) |  |

enable bod

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.
  [in] | enable | bod enable flag. the value can be HAL_BOD_ENABLE or HAL_BOD_DISABLE

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_bod_fedge_callback()

void hal_bod_fedge_callback | ( | bod_handle_t * | p_bod | ) |

BOD fall edge callback.

Note
  This function should not be modified. When the callback is needed, the hal_bod_fedge_callback can be implemented in the user file.

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.

## ◆ hal_bod_fedge_irq_handler()

void hal_bod_fedge_irq_handler | ( | bod_handle_t * | p_bod | ) |

Handle BOD fall edge interrupt request.

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.

## ◆ hal_bod_init()

hal_status_t hal_bod_init | ( | bod_handle_t * | p_bod | ) |

Initialize the BOD according to the specified parameters in the bod_init_t and initialize the associated handle.

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD 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_bod_msp_deinit()

void hal_bod_msp_deinit | ( | bod_handle_t * | p_bod | ) |

De-initialize the BOD MSP.

Note
  This function should not be modified. When the callback is needed, the hal_bod_msp_deinit could be implemented in the user file

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.

## ◆ hal_bod_msp_init()

void hal_bod_msp_init | ( | bod_handle_t * | p_bod | ) |

Initialize the BOD MSP.

Note
  This function should not be modified. When the callback is needed, the hal_bod_msp_init could be implemented in the user file

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.

## ◆ hal_bod_redge_callback()

void hal_bod_redge_callback | ( | bod_handle_t * | p_bod | ) |

BOD rise edge callback.

Note
  This function should not be modified. When the callback is needed, the hal_bod_redge_callback can be implemented in the user file.

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.

## ◆ hal_bod_redge_irq_handler()

void hal_bod_redge_irq_handler | ( | bod_handle_t * | p_bod | ) |

Handle BOD rise edge interrupt request.

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.

## ◆ hal_bod_static_mode_enable()

hal_status_t hal_bod_static_mode_enable | ( | bod_handle_t * | p_bod,
|  | uint8_t | enable
| ) |  |

enable/disable static mode

Parameters

  [in] | p_bod | Pointer to an BOD handle which contains the configuration information for the specified BOD module.
  [in] | enable | static enable flag. the value can be HAL_BOD_STATIC_ENABLE or HAL_BOD_STATIC_DISABLE

Return values

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