From d66c099fb42b5666e576dc9af74cf757a1f881fe Mon Sep 17 00:00:00 2001 From: cnlohr <lohr85@gmail.com> Date: Sat, 19 Aug 2023 13:59:04 -0400 Subject: [PATCH] Fix compile for minichlink. --- ch32v003fun/ch32v003fun.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ch32v003fun/ch32v003fun.h b/ch32v003fun/ch32v003fun.h index ea0aa40..c0d422c 100644 --- a/ch32v003fun/ch32v003fun.h +++ b/ch32v003fun/ch32v003fun.h @@ -5099,6 +5099,7 @@ extern "C" { #define Ticks_from_Us(n) (n * DELAY_US_TIME) #define Ticks_from_Ms(n) (n * DELAY_MS_TIME) +#ifndef __ASSEMBLER__ // Depending on a LOT of factors, it's about 6 cycles per n. // **DO NOT send it zero or less.** static inline void Delay_Tiny( int n ) { @@ -5108,6 +5109,7 @@ static inline void Delay_Tiny( int n ) { c.addi a5, -1\n\ c.bnez a5, 1b" : : [n]"r"(n) : "a5" ); } +#endif // Add a certain number of nops. Note: These are usually executed in pairs // and take two cycles, so you typically would use 0, 2, 4, etc. -- GitLab