Functions
Functions
Peripheral Driver » HAL Driver » DELAY

## Functions
void | hal_dwt_enable (uint32_t _demcr_initial, uint32_t _dwt_ctrl_initial)
| Enable the DWT. More...
void | hal_dwt_disable (uint32_t _demcr_initial, uint32_t _dwt_ctrl_initial)
| Disable the DWT. More...
__STATIC_FORCEINLINE void | delay_us (uint32_t number_of_us)
| Function for delaying execution for number of us. More...
__STATIC_FORCEINLINE void | delay_ms (uint32_t number_of_ms)
| Function for delaying execution for number of milliseconds. More...

## Detailed Description

## Function Documentation

## ◆ delay_ms()

__STATIC_FORCEINLINE void delay_ms | ( | uint32_t | number_of_ms | ) |

Function for delaying execution for number of milliseconds.

Note
  GR55xx is based on ARM Cortex-M4, and this fuction is based on Data Watchpoint and Trace (DWT) unit so delay is precise.
  Function internally calls delay_us so the maximum delay is the same as in case of delay_us.

Parameters

  number_of_ms | The maximum delay time is about 67 seconds in 64M system clock. The faster the system clock, the shorter the maximum delay time.

Definition at line 313 of file gr55xx_delay.h.

References delay_us().

## ◆ delay_us()

__STATIC_FORCEINLINE void delay_us | ( | uint32_t | number_of_us | ) |

Function for delaying execution for number of us.

Note
  GR55xxx is based on ARM Cortex-M4, and this fuction is based on Data Watchpoint and Trace (DWT) unit so delay is precise.

Parameters

  number_of_us | The maximum delay time is about 67 seconds in 64M system clock. The faster the system clock, the shorter the maximum delay time.

Definition at line 154 of file gr55xx_delay.h.

References HAL_TIMEOUT_DEINIT, and HAL_TIMEOUT_INIT.

Referenced by delay_ms().

## ◆ hal_dwt_disable()

void hal_dwt_disable | ( | uint32_t | _demcr_initial,
|  | uint32_t | _dwt_ctrl_initial
| ) |  |

Disable the DWT.

Parameters

  _demcr_initial | demcr initial.
  _dwt_ctrl_initial | dwt ctrl initial.

## ◆ hal_dwt_enable()

void hal_dwt_enable | ( | uint32_t | _demcr_initial,
|  | uint32_t | _dwt_ctrl_initial
| ) |  |

Enable the DWT.

Parameters

  _demcr_initial | demcr initial.
  _dwt_ctrl_initial | dwt ctrl initial.