/* ********************************************************************************************************* * 函 数 名: main * 功能说明: c程序入口 * 形 参:无 * 返 回 值: 错误代码(无需处理) ********************************************************************************************************* */ #include "stm32f4xx.h" #include "led.h" void Delay(uint32_t count) { for (; count != 0; count--) ; } int main(void) { #if 0 /* 打开GOIOI 端口时钟 */ *(unsigned int *)(0x40023800 + 0x30) |= (1 << 8); /* PI10 为输出 */ *(unsigned int *)(0x40022000 + 0x00) &= ~((0x03) << (2 * 10)); *(unsigned int *)(0x40022000 + 0x00) |= (1 << (2 * 10)); /* PI10 输出高电平 */ *(unsigned int *)(0x40022000 + 0x14) |= (1 << 10); /* PI10 输出低电平 */ *(unsigned int *)(0x40022000 + 0x14) &= ~(1 << 10); #elif 1 LED_Init(); while (1) { GPIO_ResetBits(GPIOI, GPIO_Pin_10); Delay(0xFFFFFFFF); // GPIO_SetBits(GPIOI, GPIO_Pin_10); // Delay(0xFFFFFFFF); GPIO_ResetBits(GPIOF, GPIO_Pin_7); Delay(0xFFFFFF); // GPIO_SetBits(GPIOF, GPIO_Pin_7); // Delay(0xFFFFFF); GPIO_ResetBits(GPIOF, GPIO_Pin_8); Delay(0xFFFFFF); // GPIO_SetBits(GPIOF, GPIO_Pin_8); // Delay(0xFFFFFF); GPIO_ResetBits(GPIOC, GPIO_Pin_2); Delay(0xFFFFFF); // GPIO_SetBits(GPIOC, GPIO_Pin_2); // Delay(0xFFFFFF); }; #endif } // void SystemInit(void) // { // }