From 4f09b621e12e5ecf5b34396a36556a8dca49e8cd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 8 Aug 2018 08:17:17 +0200 Subject: MSP430: Add delay_ms --- src/arch/msp430fr5969lp/arch.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/arch/msp430fr5969lp') 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) { -- cgit v1.2.3