summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2018-08-08 08:17:17 +0200
committerDaniel Friesel <derf@finalrewind.org>2018-08-08 08:17:17 +0200
commit4f09b621e12e5ecf5b34396a36556a8dca49e8cd (patch)
tree39487052f84b7203c665262f6e1964095ca46cb9 /src/arch
parent178835c160940772341615dab7a239c45a875807 (diff)
MSP430: Add delay_ms
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/msp430fr5969lp/arch.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/arch/msp430fr5969lp/arch.cc b/src/arch/msp430fr5969lp/arch.cc
index ddb84a4..04a52c9 100644
--- a/src/arch/msp430fr5969lp/arch.cc
+++ b/src/arch/msp430fr5969lp/arch.cc
@@ -78,6 +78,12 @@ void Arch::delay_us(unsigned char const us)
__delay_cycles(160);
}
}
+void Arch::delay_ms(unsigned char const ms)
+{
+ for (int i = 0; i < ms; i++) {
+ __delay_cycles(16000);
+ }
+}
void Arch::idle_loop(void)
{