嵌入式 库函数编程
#include "stm32f10x.h" void Delay(u32 count) //延时函数 传入参数 { u32 i=0; for(;i<count;i++); } int main(void) //主函数 { // Device header GPIO_InitTypeDef g; g.GPIO_Pin = GPIO_Pin_5; g.GPIO_Mode = GPIO_Mode_Out_PP; g.GPIO_Speed = GPIO_Speed_10MHz; GPIO_Init(GPIOB,&g); while(1) { GPIO_ResetBits(GPIOB,GPIO_Pin_5); Delay(300); GPIO_SetBits(GPIOB,GPIO_Pin_5); Delay(300); } }
一个二次元的生物

浙公网安备 33010602011771号