標題: STM32移植UCOSIII基礎(chǔ)工程源碼 [打印本頁]

作者: 蒼穹問道者    時間: 2019-2-5 20:36
標題: STM32移植UCOSIII基礎(chǔ)工程源碼
STM32移植UCOSIII基礎(chǔ)工程

單片機源程序如下:
  1. #include "sys.h"
  2. #include "delay.h"
  3. #include "led.h"
  4. #include "usart.h"
  5. #include "key.h"
  6. #include "i2c.h"
  7. #include "24xx.h"
  8. #include "dma_mm.h"
  9. #include "dma_mp.h"

  10. //extern const uint32_t aSRC_Const_Buffer[32];
  11. //extern uint32_t aDST_Buffer[32];

  12. extern uint8_t SendBuff[5000];

  13. int main()
  14. {
  15. //    uint8_t TranslateStatus;
  16. //    uint8_t Len=32;
  17. //    uint8_t le=0;
  18.       uint32_t i;
  19.    
  20.         delay_init();
  21.         NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);
  22.         LEDInit();
  23.         USART1_Init(115200);
  24.         KEY_Init();
  25.     //DMA_MM_Init();
  26.     DMA_MP_Init();
  27.     printf("這是我的DMA實驗\r\n");
  28.   
  29.     for ( i=0; i<5000; i++)
  30.    {
  31.       SendBuff[i] = 'P';
  32.       if(i%100==0)
  33.       {
  34.         printf("\r\n");
  35.       }
  36.    }
  37.    
  38.     USART_DMACmd(USART1,USART_DMAReq_Tx,ENABLE);

  39.         while(1)
  40.    {
  41.    
  42.    }

  43. }
復(fù)制代碼

所有資料51hei提供下載:
固件庫模板創(chuàng)建 -點亮LED.7z (564.65 KB, 下載次數(shù): 21)






歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1