aboutsummaryrefslogtreecommitdiff
path: root/projects/hsm
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2017-04-26 19:59:24 -0400
committerRob Austein <sra@hactrn.net>2017-04-26 19:59:24 -0400
commit0ced3ff3f64ca7ee0fc804d8f6dcfc89d2c5492f (patch)
tree65d362ea13a8ceb16986fe7c2f55777efd96a4c2 /projects/hsm
parent410e6bb67fb5df5d0e4c962deac3e5562e5dc48f (diff)
Add support for hal_sleep().
Diffstat (limited to 'projects/hsm')
-rw-r--r--projects/hsm/hsm.c4
1 files changed, 4 insertions, 0 deletions
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.
*/