Skip to content

Commit 9d46a1c

Browse files
Alternative fix for issue #532
1 parent 683b6d2 commit 9d46a1c

File tree

1 file changed

+4
-0
lines changed
  • STM32F1/system/libmaple/include/libmaple

1 file changed

+4
-0
lines changed

STM32F1/system/libmaple/include/libmaple/delay.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ extern "C" {
4646
* @param us Number of microseconds to delay.
4747
*/
4848
static inline void delay_us(uint32 us) {
49+
if (us==0)
50+
{
51+
return;
52+
}
4953
us *= STM32_DELAY_US_MULT;
5054

5155
/* fudge for function call overhead */

0 commit comments

Comments
 (0)