ARM functions for busy-wait delay loops.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include "delay.h"
Functions | |
void | delay_cycles_ms (uint32_t n) |
Delay loop to delay at least n number of milliseconds. More... | |
void | delay_cycles_us (uint32_t n) |
Delay loop to delay at least n number of microseconds. More... | |
void | delay_init (void) |
Initialize the delay driver. More... | |
Variables | |
static uint32_t | cycles_per_ms = 8000000UL / 1000 |
Value used to calculate ms delay. More... | |
static uint32_t | cycles_per_us = 8000000UL / 1000000 |
void delay_cycles_ms | ( | uint32_t | n | ) |
Delay loop to delay at least n number of milliseconds.
n | Number of milliseconds to wait |
References cycles_per_ms, and delay_cycles().
void delay_cycles_us | ( | uint32_t | n | ) |
Delay loop to delay at least n number of microseconds.
n | Number of microseconds to wait |
References cycles_per_us, and delay_cycles().
|
static |
Value used to calculate ms delay.
Default to be used with a 8MHz clock;
Referenced by delay_cycles_ms(), and delay_init().
|
static |
Referenced by delay_cycles_us(), and delay_init().