summaryrefslogtreecommitdiff
path: root/src/arch/blinkenrocket
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-09-10 12:40:31 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-09-10 12:40:31 +0200
commitcaecdb12209b5be67824a19591fbb3949896972e (patch)
tree4b84667d4db8ae88044aa847abe863ee7f55e5ef /src/arch/blinkenrocket
parent0669c8de2fb6cc193ef0c85039e54487e430cf88 (diff)
blinkenrocket: make delay_ms, sleep_ms work with non-compile time constants
Diffstat (limited to 'src/arch/blinkenrocket')
-rw-r--r--src/arch/blinkenrocket/arch.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/arch/blinkenrocket/arch.cc b/src/arch/blinkenrocket/arch.cc
index d49bfda..ffe68a0 100644
--- a/src/arch/blinkenrocket/arch.cc
+++ b/src/arch/blinkenrocket/arch.cc
@@ -62,12 +62,16 @@ void Arch::idle(void)
void Arch::delay_us(unsigned int const us)
{
- _delay_us(us);
+ for (unsigned int i = 0; i < us; i++) {
+ _delay_us(1);
+ }
}
void Arch::delay_ms(unsigned int const ms)
{
- _delay_ms(ms);
+ for (unsigned int i = 0; i < ms; i++) {
+ _delay_ms(1);
+ }
}
Arch arch;