diff --git a/ch32v003fun/ch32v003fun.h b/ch32v003fun/ch32v003fun.h index ea0aa40f6e624ac4502a91f730752c6f650a538c..c0d422cf76e7c6ec283ab8be415a89ada3c247e4 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.