//下面是头文件中的内容。
#ifdef __IAR_SYSTEMS_ICC__
typedef struct
{
unsigned char CC1S : 2;
unsigned char OC1FE : 1;
unsigned char OC1PE : 1;
unsigned char OC1M : 3;
unsigned char OC1CE : 1;
} __BITS_TIM1_CCMR1;
#endif
__IO_REG8_BIT(TIM1_CCMR1, 0x5258, __READ_WRITE, __BITS_TIM1_CCMR1);
//自己写的程序。
__BITS_TIM1_CCMR1 NEW_CCMR1;
NEW_CCMR1.OC1FE=1; //执行完这句,OC1FE位还是0;直接操作TIM1_CCMR1=0X04,OC1FE 会变1。 |