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.

## ◆ 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.

## ◆ 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.