int main(void)
{
#if YHMINI
/* 配置RCC寄存器,使能GPIO口的时钟 */
*(unsigned int *)0X40021018 |= (1<<4);
/* 配置CRL寄存器,配置为推挽输出 */
GPIOC->CRL |= ( 1<<(4*2) );
/* 配套ODR寄存器 */
GPIOC->ODR &= ~( 1<<2 );
while(1)
{
GPIOC->ODR &= ~( 1<<2 );
soft_delay(0xfffff);
GPIOC->ODR |= ( 1<<2 );
soft_delay(0xfffff);
}
#elif YHIOT
/* 配置RCC寄存器,使能GPIO口的时钟 */
*(unsigned int *)0X40021018 |= (1<<3);
/* 配置CRL寄存器,配置为推挽输出 */
GPIOB->CRL |= ( 1<<(4*0) );
/* 配套ODR寄存器 */
GPIOB->ODR &= ~( 1<<0 );
while(1)
{
GPIOB->ODR &= ~( 1<<0 );
soft_delay(0xfffff);
GPIOB->ODR |= ( 1<<0 );
soft_delay(0xfffff);
}
#endif
}
void SystemInit(void)
{
/* 函数体为空,目的是为了骗过编译器不报错 */
}
PIOC->ODR &= ~( 1<<2 );
main.c(28): warning: #174-D: expression has no effect |