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

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > stm32 IAR環(huán)境printf函數(shù)調(diào)用

          stm32 IAR環(huán)境printf函數(shù)調(diào)用

          作者: 時間:2016-11-26 來源:網(wǎng)絡 收藏
          在串口都配置好的情況下,在main.c文件中加入

          #include

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

          #ifdef __GNUC__

          #define PUTCHAR_PROTOTYPE int __io_putchar(int ch)
          #else
          #define PUTCHAR_PROTOTYPE int fputc(int ch, FILE *f)
          #endif

          PUTCHAR_PROTOTYPE
          {


          USART_SendData(EVAL_COM1, (uint8_t) ch);


          while (USART_GetFlagStatus(EVAL_COM1, USART_FLAG_TC) == RESET)
          {}

          return ch;
          }

          #ifdefUSE_FULL_ASSERT

          之后如若編譯出現(xiàn)identifier "FILE" is undefined,即將Options->GeneralOptions->Library Configuation中的Library選為full即可



          評論


          技術專區(qū)

          關閉
          看屁屁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); })();