但是在AN2033里有介绍使用bit操作啊
Simple Macro to Flip Bits
A desirable feature would be to flip an I/O port bit with a simple statement like P0.0 = 1. Using C macro programming this is easily accomplished.
Consider the following C code:
#include "m8c.h"
#define Port0_0(b) (PRT0DR = (b==0) ? (PRT0DR&0xFE) : (PRT0DR|0x01))
void main()
{
Port0_0(1); // Set Port 0, bit 0 to 1
}
The C Compiler pre-processor in PSoC Designer replaces this Port0_0(1) call in main() with the macro definition before compiling. The assembly code generated is:
OR REG[0],1