This commit is contained in:
moyuhai
2026-06-12 09:12:35 +08:00
commit 02f1638ef2
91 changed files with 38366 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
#ifndef DEFINE_H
#define DEFINE_H
#define BIT0 0x01
#define BIT1 0x02
#define BIT2 0x04
#define BIT3 0x08
#define BIT4 0x10
#define BIT5 0x20
#define BIT6 0x40
#define BIT7 0x80
#define BIT8 0x100
#define BIT9 0x200
#define BIT10 0x400
#define BIT11 0x800
#define BIT12 0x1000
#define BIT13 0x2000
#define BIT14 0x4000
#define BIT15 0x8000
#define __NOP1__ _nop_()
#define __NOP2__ __NOP1__; __NOP1__
#define __NOP4__ __NOP2__; __NOP2__
#define __NOP8__ __NOP4__; __NOP4__
#define __NOP16__ __NOP8__; __NOP8__
#define __NOP32__ __NOP16__; __NOP16__
#define __NOP64__ __NOP32__; __NOP32__
#define __NOP128__ __NOP64__; __NOP64__
#define DelayNop(a) \
if ((a)&(0x01)) {__NOP1__;} \
if ((a)&(0x02)) {__NOP2__;} \
if ((a)&(0x04)) {__NOP4__;} \
if ((a)&(0x08)) {__NOP8__;} \
if ((a)&(0x10)) {__NOP16__;} \
if ((a)&(0x20)) {__NOP32__;} \
if ((a)&(0x40)) {__NOP64__;} \
if ((a)&(0x80)) {__NOP128__;}
#endif