使用引用定义不用写那么多语句,很简单的1开始+2,寥寥数句即可完成。char a=0x00,aa=0x01;while(1){P0=a+=aa;aa=2;}https://img-blog.csdnimg.cn/20210721082628136.gif