Added arch API for msec delay.

This commit is contained in:
Dave 2021-12-04 23:06:39 -06:00
parent 45329de193
commit 66df34a972
4 changed files with 20 additions and 28 deletions

View File

@ -681,24 +681,21 @@ void asdf_arch_pulse_delay_long(void)
_delay_ms(ASDF_PULSE_DELAY_LONG_MS);
}
// PROCEDURE: asdf_arch_character_delay
// INPUTS: none
// PROCEDURE: asdf_arch_delay_ms
// INPUTS: (uint16) delay_ms - the delay in msec.
// OUTPUTS: none
//
// DESCRIPTION: Delays a fixed amount of time after each character of a system
// message, to allow polled systems to catch up.
// DESCRIPTION: Delays a specified number of milliseconds
//
// SIDE EFFECTS: see above.
//
// NOTES: Set ASDF_PULSE_DELAY_US in asdf_config.h
//
// SCOPE: public
//
// COMPLEXITY: 1
//
void asdf_arch_character_delay(void)
void asdf_arch_delay_ms(uint16_t delay_ms)
{
_delay_ms(ASDF_MESSAGE_CHARACTER_DELAY);
_delay_ms(delay_ms);
}
// PROCEDURE: asdf_arch_init

View File

@ -475,13 +475,11 @@ void asdf_arch_pulse_delay_short(void);
// ASDF_PULSE_DELAY_LONG_MS
void asdf_arch_pulse_delay_long(void);
// PROCEDURE: asdf_arch_character_delay
// INPUTS: none
// PROCEDURE: asdf_arch_delay_ms
// INPUTS: (uint16) delay_ms - the delay in msec.
// OUTPUTS: none
// DESCRIPTION: Delays a fixed amount of time after each character of a system
// message, to allow polled systems to catch up.
// NOTES: Set ASDF_CHARACTER_DELAY_US in asdf_config.h
void asdf_arch_character_delay(void);
// DESCRIPTION: Delays a specified number of milliseconds
void asdf_arch_delay_ms(uint16_t delay_ms);
// PROCEDURE: asdf_arch_tick
// INPUTS: none

View File

@ -677,24 +677,23 @@ void asdf_arch_pulse_delay_long(void)
_delay_ms(ASDF_PULSE_DELAY_LONG_MS);
}
// PROCEDURE: asdf_arch_character_delay
// INPUTS: none
// PROCEDURE: asdf_arch_delay_ms
// INPUTS: (uint16) delay_ms - the delay in msec.
// OUTPUTS: none
//
// DESCRIPTION: Delays a fixed amount of time after each character of a system
// message, to allow polled systems to catch up.
// DESCRIPTION: Delays a specified number of milliseconds
//
// SIDE EFFECTS: see above.
//
// NOTES: Set ASDF_PULSE_DELAY_US in asdf_config.h
//
// SCOPE: public
//
// COMPLEXITY: 1
//
void asdf_arch_character_delay(void)
void asdf_arch_delay_ms(uint16_t delay_ms)
{
_delay_ms(ASDF_MESSAGE_CHARACTER_DELAY);
for (uint16_t i=0; i < delay_ms; i++) {
_delay_ms(1);
}
}
// PROCEDURE: asdf_arch_init

View File

@ -376,13 +376,11 @@ void asdf_arch_pulse_delay_short(void);
// DESCRIPTION: Delays a fixed amount of time for keyboard output pulses specified by ASDF_PULSE_DELAY_LONG_MS
void asdf_arch_pulse_delay_long(void);
// PROCEDURE: asdf_arch_character_delay
// INPUTS: none
// PROCEDURE: asdf_arch_delay_ms
// INPUTS: (uint16) delay_ms - the delay in msec.
// OUTPUTS: none
// DESCRIPTION: Delays a fixed amount of time after each character of a system
// message, to allow polled systems to catch up.
// NOTES: Set ASDF_CHARACTER_DELAY_US in asdf_config.h
void asdf_arch_character_delay(void);
// DESCRIPTION: Delays a specified number of milliseconds
void asdf_arch_delay_ms(uint16_t delay_ms);
// PROCEDURE: asdf_arch_tick
// INPUTS: none