#define RA4=0 spi_write(0x0e,0x02)
#define RA4=1 spi_write(0x0e,0x01)
#define RA5=0 spi_write(0x0e,0x01)
#define RA5=1 spi_write(0x0e,0x02)
试试这样:
#define Clr_RA4() {spi_write(0x0e,0x02);}
#define Set_RA4() {spi_write(0x0e,0x01);}
#define Clr_RA5() {spi_write(0x0e,0x01);}
#define Set_RA5() {spi_write(0x0e,0x02);}