-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHAL_Delay.cpp
29 lines (24 loc) · 925 Bytes
/
HAL_Delay.cpp
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
/**
* \file
* \brief HAL_Delay() definition
*
* \author Copyright (C) 2019-2024 Kamil Szczygiel https://distortec.com https://freddiechopin.info
*
* \par License
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
* distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#include "stm32u5xx_hal.h"
#include "distortos/ThisThread.hpp"
/*---------------------------------------------------------------------------------------------------------------------+
| global functions
+---------------------------------------------------------------------------------------------------------------------*/
/**
* \brief Delay current thread.
*
* \param [in] delayMs is the delay length, milliseconds
*/
extern "C" void HAL_Delay(const uint32_t delayMs)
{
distortos::ThisThread::sleepFor(std::chrono::milliseconds{delayMs});
}