zoukankan      html  css  js  c++  java
  • 嵌入式实验一

    #include"stm32f10x.h"
    #include<stdio.h>
    #include<string.h>

    void GPIO_Cofiguration(void);
    void Delay(uint32_t nCount);

    int main(void)
    {
     GPIO_Cofiguration();
                                       
     while(1){
      GPIO_SetBits(GPIOF,GPIO_Pin_6);
      Delay(0x1fffff);
      GPIO_ResetBits(GPIOF,GPIO_Pin_6);
      
      GPIO_SetBits(GPIOF,GPIO_Pin_8);
      Delay(0x1fffff);
      GPIO_ResetBits(GPIOF,GPIO_Pin_8);
      
      GPIO_SetBits(GPIOF,GPIO_Pin_7);
      Delay(0x1fffff);
      GPIO_ResetBits(GPIOF,GPIO_Pin_7);
      
      GPIO_SetBits(GPIOF,GPIO_Pin_9);
      Delay(0x1fffff);
      GPIO_ResetBits(GPIOF,GPIO_Pin_9);
     }
    }
    void GPIO_Cofiguration(void){
    GPIO_InitTypeDef GPIO_InitStructure;
     
     RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOF,ENABLE);
     GPIO_InitStructure.GPIO_Pin=GPIO_Pin_6|GPIO_Pin_8|GPIO_Pin_7|GPIO_Pin_9;
     GPIO_InitStructure.GPIO_Speed=GPIO_Speed_50MHz;
     GPIO_InitStructure.GPIO_Mode=GPIO_Mode_Out_PP;
     GPIO_Init(GPIOF,&GPIO_InitStructure);
     

    }
    void Delay(uint32_t nCount){
    for(;nCount !=0;nCount--);
    }

  • 相关阅读:
    Next Permutation
    Generate Parentheses
    Unique Binary Search Trees II
    LDP LSP建立
    LDP标签分发和管理
    维护LDP会话
    LDP会话状态机
    LDP会话建立过程
    LDP发现机制
    LDP术语
  • 原文地址:https://www.cnblogs.com/rourou123/p/8030115.html
Copyright © 2011-2022 走看看