<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          STM32F107VCT6的GPIO配置

          作者: 時(shí)間:2016-11-10 來(lái)源:網(wǎng)絡(luò) 收藏
          輸出配置

          #define LED_GPIO GPIOC
          #define LED_PIN GPIO_Pin_9

          本文引用地址:http://www.ex-cimer.com/article/201611/317517.htm

          void GPIO_Configuration(void)
          {
          GPIO_InitTypeDef GPIO_InitStructure;

          //LED
          GPIO_InitStructure.GPIO_Pin = LED_PIN;
          GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽式輸出
          GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
          GPIO_Init(LED_GPIO, &GPIO_InitStructure);
          GPIO_WriteBit(LED_GPIO, LED_PIN, Bit_RESET);
          }

          輸入配置

          #define MON_GPIO GPIOC
          #define MON_PIN GPIO_Pin_9

          void GPIO_Configuration(void)
          {
          GPIO_InitTypeDef GPIO_InitStructure;

          //監(jiān)視管腳
          GPIO_InitStructure.GPIO_Pin = MON_PIN;
          GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IPD; //GPIO_Mode_IN_FLOATING浮空輸入模式
          GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
          GPIO_Init(MON_GPIO, &GPIO_InitStructure);
          }




          關(guān)鍵詞: STM32F107VCT6GPIO配

          評(píng)論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();