From 0ced3ff3f64ca7ee0fc804d8f6dcfc89d2c5492f Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 26 Apr 2017 19:59:24 -0400 Subject: Add support for hal_sleep(). --- projects/hsm/hsm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'projects/hsm/hsm.c') diff --git a/projects/hsm/hsm.c b/projects/hsm/hsm.c index f71e2c2..6fcdee4 100644 --- a/projects/hsm/hsm.c +++ b/projects/hsm/hsm.c @@ -117,6 +117,10 @@ void hal_ks_lock(void) { osMutexWait(ks_mutex, osWaitForever); } void hal_ks_unlock(void) { osMutexRelease(ks_mutex); } #endif +/* Sleep for specified number of seconds. + */ +void hal_sleep(const unsigned seconds) { osDelay(seconds * 1000); } + /* A ring buffer for the UART DMA receiver. In theory, it should get at most * 92 characters per 1ms tick, but we're going to up-size it for safety. */ -- cgit v1.2.3