Welcome to mirror list, hosted at ThFree Co, Russian Federation.

furi_hal_delay.h « furi_hal_include « targets « firmware - github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 733097ce187b2d59297d827d4bcf31ebbbc63bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/**
 * @file furi_hal_delay.h
 * Delay HAL API
 */

#pragma once

#include "main.h"

#ifdef __cplusplus
extern "C" {
#endif

/** Init DWT
 */
void furi_hal_delay_init(void);

/** Delay in milliseconds
 * @warning    Cannot be used from ISR
 *
 * @param[in]  milliseconds  milliseconds to wait
 */
void delay(float milliseconds);

/** Delay in microseconds
 *
 * @param[in]  microseconds  microseconds to wait
 */
void delay_us(float microseconds);

/** Get current millisecond
 * 
 * System uptime, pProvided by HAL, may overflow.
 *
 * @return     Current milliseconds
 */
uint32_t millis(void);

#ifdef __cplusplus
}
#endif