summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/nrf/mphalport.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ports/nrf/mphalport.c b/ports/nrf/mphalport.c
index fc6882d79..e0f42ac58 100644
--- a/ports/nrf/mphalport.c
+++ b/ports/nrf/mphalport.c
@@ -82,6 +82,10 @@ void mp_hal_stdout_tx_str(const char *str) {
void mp_hal_delay_us(mp_uint_t us)
{
+ if (us == 0) {
+ return;
+ }
+
register uint32_t delay __ASM ("r0") = us;
__ASM volatile (
#ifdef NRF51