#define BITBAND(addr, bitnum) ((addr & 0xF0000000)+0x2000000+((addr &0xFFFFF)<<5)+(bitnum<<2))
#define MEM_ADDR(addr) *((volatile unsigned long *)(addr))
#define BIT_ADDR(addr, bitnum) MEM_ADDR(BITBAND(addr, bitnum))
#define PCout(n) BIT_ADDR(GPIOC_ODR_Addr,n)
就是上面这几个宏定义,想把这个移植到cortex-M0上,M0不支持位带操作,这几个宏定义应该怎么转变,实在是搞不懂了,请大家帮我看看
楼主最近还看过