From 93b063fedfcf7409a67df035170ea5670cad22e1 Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 24 Nov 2020 13:46:41 -0700 Subject: Moved action to top level. Removed old iterations of the project and moved the files from 02-usart to the root directory since that's the sole place where the action is and that subproject has outgrown its initial title. --- src/kern/delay.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/kern/delay.c (limited to 'src/kern/delay.c') diff --git a/src/kern/delay.c b/src/kern/delay.c new file mode 100644 index 0000000..28ef710 --- /dev/null +++ b/src/kern/delay.c @@ -0,0 +1,9 @@ +#include "kern/delay.h" + +void delay(uint32_t delay) +{ + while (delay--) { + /* needed to keep the compiler from optimizing away the loop. */ + asm volatile(""); + } +} -- cgit