diff options
author | Daniel Friesel <derf@finalrewind.org> | 2018-10-15 16:22:55 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2018-10-15 16:22:55 +0200 |
commit | 5471509e033abcddb078383cc4656af06c265ce6 (patch) | |
tree | 09a49d487135932793e06b748892bed1ffb37120 /src/arch | |
parent | 2c1afc394913da7cb4823d72f3a11fbc43c9595e (diff) |
Enable busy waiting in I2C driver to reach selected I2C clock
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arduino-nano/arch.cc | 4 | ||||
-rw-r--r-- | src/arch/blinkenrocket/arch.cc | 4 | ||||
-rw-r--r-- | src/arch/msp430fr5969lp/arch.cc | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/arch/arduino-nano/arch.cc b/src/arch/arduino-nano/arch.cc index 3009637..b034348 100644 --- a/src/arch/arduino-nano/arch.cc +++ b/src/arch/arduino-nano/arch.cc @@ -67,12 +67,12 @@ void Arch::idle(void) asm("wdr"); } -void Arch::delay_us(unsigned char const us) +void Arch::delay_us(unsigned int const us) { _delay_us(us); } -void Arch::delay_ms(unsigned char const ms) +void Arch::delay_ms(unsigned int const ms) { _delay_ms(ms); } diff --git a/src/arch/blinkenrocket/arch.cc b/src/arch/blinkenrocket/arch.cc index 8042679..1261515 100644 --- a/src/arch/blinkenrocket/arch.cc +++ b/src/arch/blinkenrocket/arch.cc @@ -64,12 +64,12 @@ void Arch::idle(void) asm("wdr"); } -void Arch::delay_us(unsigned char const us) +void Arch::delay_us(unsigned int const us) { _delay_us(us); } -void Arch::delay_ms(unsigned char const ms) +void Arch::delay_ms(unsigned int const ms) { _delay_ms(ms); } diff --git a/src/arch/msp430fr5969lp/arch.cc b/src/arch/msp430fr5969lp/arch.cc index b475c5f..b5b23b6 100644 --- a/src/arch/msp430fr5969lp/arch.cc +++ b/src/arch/msp430fr5969lp/arch.cc @@ -93,15 +93,15 @@ extern void loop(); volatile char run_loop = 0; #endif -void Arch::delay_us(unsigned char const us) +void Arch::delay_us(unsigned int const us) { - for (int i = 0; i < us/10; i++) { + for (unsigned int i = 0; i < us/10; i++) { __delay_cycles(160); } } -void Arch::delay_ms(unsigned char const ms) +void Arch::delay_ms(unsigned int const ms) { - for (int i = 0; i < ms; i++) { + for (unsigned int i = 0; i < ms; i++) { __delay_cycles(16000); } } |