aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/helpers.h1
-rw-r--r--slof/helpers.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/helpers.h b/include/helpers.h
index e37f916..1663ea8 100644
--- a/include/helpers.h
+++ b/include/helpers.h
@@ -20,6 +20,7 @@
extern uint32_t SLOF_GetTimer(void);
extern void SLOF_msleep(uint32_t time);
+extern void SLOF_usleep(uint32_t time);
extern void *SLOF_dma_alloc(long size);
extern void SLOF_dma_free(void *virt, long size);
extern void *SLOF_alloc_mem(long size);
diff --git a/slof/helpers.c b/slof/helpers.c
index cee8729..c582996 100644
--- a/slof/helpers.c
+++ b/slof/helpers.c
@@ -40,6 +40,12 @@ void SLOF_msleep(uint32_t time)
cpu_relax();
}
+void SLOF_usleep(uint32_t time)
+{
+ forth_push(time);
+ forth_eval("us");
+}
+
void *SLOF_dma_alloc(long size)
{
forth_push(size);