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

          新聞中心

          STM32F051R8T6的GPIO配置

          作者: 時間:2016-11-10 來源:網(wǎng)絡(luò) 收藏
          GPIO輸入模式

          void GPIO_Configuration(void)
          {
          GPIO_InitTypeDef GPIO_InitStructure;

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

          RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC, ENABLE);

          GPIO_InitStructure.GPIO_Pin = GPIO_Pin_14;
          GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
          GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_DOWN;;
          GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
          GPIO_Init(GPIOC, &GPIO_InitStructure);
          }

          GPIO輸出模式

          void GPIO_Configuration(void)
          {
          GPIO_InitTypeDef GPIO_InitStructure;

          RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOC, ENABLE);


          /************************* LED *************************/
          GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
          GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
          GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
          GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
          GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
          GPIO_Init(GPIOD, &GPIO_InitStructure);
          GPIO_WriteBit(GPIOD, GPIO_Pin_2, Bit_RESET);
          }



          關(guān)鍵詞: STM32F051R8T6GPIO配

          評論


          技術(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); })();