如需要直接修改函数里的参数即可!
下面是宏定义!
/******************************************************************************
GPIO
******************************************************************************/
#define OUT 1
#define IN 0
#define H 1
#define L 0
#define _2mA 0
#define _4mA 1
#define E 0
#define D 1
#define DIR_7(x) x<<31
#define DIR_6(x) x<<30
#define DIR_5(x) x<<29
#define DIR_4(x) x<<28
#define DIR_3(x) x<<27
#define DIR_2(x) x<<26
#define DIR_1(x) x<<25
#define DIR_0(x) x<<24
#define OUT_7(x) x<<23
#define OUT_6(x) x<<22
#define OUT_5(x) x<<21
#define OUT_4(x) x<<20
#define OUT_3(x) x<<19
#define OUT_2(x) x<<18
#define OUT_1(x) x<<17
#define OUT_0(x) x<<16
#define P00_SS(x) x<<0
#define P01_SCLK_SCL(x) x<<4
#define P02_MISO(x) x<<8
#define P03_MOSI_SDA(x) x<<12
#define P04_IRQ0_PWM1(x) x<<16
#define P05_CTS(x) x<<20
#define P06_RTS(x) x<<24
#define P10_IRQ1_SIN_T0(x) x<<0
#define P11_SOUT(x) x<<4
#define P12_SYNC(x) x<<8
#define P13_TRIP(x) x<<12
#define P14_PWM2(x) x<<16
#define P15_PWM3(x) x<<20
#define P16_PWM4(x) x<<24
#define P20_IRQ2_PWM0_EXTCLK(x) x<<0
#define P21_IRQ3_PWM5(x) x<<4
#define C7(x) x<<15
#define C6(x) x<<14
#define C5(x) x<<13
#define C4(x) x<<12
#define C3(x) x<<11
#define C2(x) x<<10
#define C1(x) x<<9
#define C0(x) x<<8
#define PD7(x) x<<7
#define PD6(x) x<<6
#define PD5(x) x<<5
#define PD4(x) x<<4
#define PD3(x) x<<3
#define PD2(x) x<<2
#define PD1(x) x<<1
#define PD0(x) x<<0