你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

FreeRTOS在STM32F2平台的移植(后续有更新)  

[复制链接]
caizhiwei 发布时间:2015-3-13 13:56
阅读主题, 点击返回1楼
赞 收藏 3 评论52 发布时间:2015-3-13 13:56
52个回答
stary666 回答时间:2015-3-14 11:48:38
wwwhlw 回答时间:2015-3-15 12:56:23
谢谢分享
eurphan 回答时间:2015-3-15 15:50:45
不错不错  
2b青年 回答时间:2015-3-29 11:09:19
好 正需要 哈哈啊哈啊哈哈
moyanming2013 回答时间:2015-3-29 17:42:26
资料不错。。。
af0101 回答时间:2015-4-26 22:15:09
/ K" {3 P1 F! C6 {3 l3 w
谢谢分享            
埃斯提爱慕 回答时间:2015-4-26 22:53:50
提示: 作者被禁止或删除 内容自动屏蔽
hmchen1 回答时间:2015-4-27 04:08:01
谢谢分享,我想弄一个Nuttx的
qiu-368230 回答时间:2015-4-27 08:46:45
好东西,支持
stary666 回答时间:2015-4-27 09:27:46
支持一下。。。
caizhiwei 回答时间:2015-4-27 13:05:57
通过任务参数传入需要打印输出的文本:/ n& N% o5 O' M
  1. #include "FreeRTOS.h"
    % o5 \: f  b2 Q, l# z
  2. #include "task.h"
    ( k# ]0 }9 i, @: m% E
  3. #include "queue.h"* Y- r1 @% h9 q/ D, n% G" J2 _
  4. #include "croutine.h"
    + Q: M) ]4 [- H
  5. #include "bsp.h"3 [7 v, [3 e# D4 w& b$ A& U2 t! e

  6. 9 @1 `! M" `: r& Z- H; S4 N, x4 l

  7. 5 K& D& M: v6 c5 C% _
  8. /*
    9 `4 w) i: D9 y5 }7 w0 }- y
  9. *********************************************************************************************************** A( a' `8 W7 D, o
  10.                                                                                         函数声明
    7 W! h5 {. V; f: I
  11. **********************************************************************************************************
    # m% l  v4 v' a) q
  12. */
    7 a& F: w( v+ `$ @/ E2 Z! [7 f& e
  13. static void AppTaskCreate (void);  g0 K* d2 W' b8 R. r' R) ]: w
  14. extern void vSetupTimerTest( void );6 g5 [" ^7 i4 v' b

  15. $ }0 x$ L) s" w( l
  16. /*
    - Y/ R- b+ w: x- A$ b
  17. **********************************************************************************************************
    6 {+ o8 z( I# m" }
  18.                                                                                         变量声明
    ( T8 }5 }! {8 e$ a3 k1 {7 ?
  19. **********************************************************************************************************0 l, ?2 E& I0 G3 }5 w* A2 J5 K! H( i
  20. */% O' x& H$ {" b. U' y
  21. xTaskHandle xHandleTask3;/ p. m1 a3 U: N! z
  22. int8_t pcWriteBuffer[500];: F9 `% {$ b: o- d

  23. ) R! T" J' I0 k6 C" `; [- |
  24. /*3 D, |$ E  A" i5 u7 P, Q2 D
  25. ********************************************************************************************************** O2 E( `/ \' Z
  26. *        函 数 名: main& C& L) n4 |7 J* {6 ~. Z- }* H9 l# s$ D5 o
  27. *        功能说明: 标准c程序入口。- c9 V# D& P( G4 J5 Z/ z. }
  28. *        形    参:无* N2 h3 p+ I/ S' k( F
  29. *        返 回 值: 无
    * m' ]( _/ t3 R/ i
  30. *********************************************************************************************************
    * j: N! \7 T4 T  u$ t
  31. */5 E; S+ o/ k, z* h

  32. * F, N+ _$ ?+ t- ?1 ^
  33. static const char *pcTextForTask1 ="Task 1 is running\r\n"; ) ?3 l0 Q+ w% @0 x
  34. static const char *pcTextForTask2 ="Task 2 is running\t\n";
    / T% k# z/ |! p3 `
  35. 4 x9 H( c, ^) X3 E
  36. int main(void). |7 i* h* G4 D0 {1 ]3 e
  37. {" k2 D' K( I# P7 K, b5 C3 {& P
  38.     /* 硬件初始化 */- j* t5 i" y; B
  39.     bsp_Init();
    6 z6 [5 h% n( X. P( q/ l1 L7 c( v2 f
  40.          
    $ D4 ^9 h6 F5 z& f
  41.     /* 创建任务 */
    6 g' n8 C! F( _: v/ b- a
  42.     AppTaskCreate();$ J5 [, q. D& i- E* `
  43.    
    0 J- S7 |7 m# h8 ~) Q/ g3 _
  44.     vSetupTimerTest();" l( x+ {9 V; t- N; i
  45.         - C1 g3 r) Y$ H' O0 z
  46.     /* 启动调度,开始执行任务 */2 I$ A& |8 _& v# a: z' _
  47.     vTaskStartScheduler();
    - C# ~2 J5 G. y7 p' a/ A
  48.   }* ^' _4 h/ h/ I# Y9 j
  49.     /*
    + F1 P% `# H: l$ d6 m" ~8 K3 Y
  50.            If all is well we will never reach here as the scheduler will now be# f3 L+ H; ^7 _8 W
  51.            running.  If we do reach here then it is likely that there was insufficient
    $ b9 |6 g- o8 U  P% M& c2 ?
  52.            heap available for the idle task to be created. # f4 t1 Z& x) O; c2 J) s1 F
  53.         */
    5 v; W" {# m2 P( s4 k, v
  54.     while (1);( @9 E; O7 `4 n/ f: ?
  55. }/ h6 O3 K8 ^' \; ]. j$ `1 s

  56. + G6 G- G* D6 [
  57. /*
    , ?/ s# z# z5 D# U. W$ z1 c
  58. *********************************************************************************************************1 G, w: y' N5 A$ X
  59. *        函 数 名: vTask1
    8 _$ L/ `  U7 X# {
  60. *        功能说明: LED闪烁               
    / J7 ~4 Y9 ?& p7 \  x
  61. *        形    参:pvParameters 是在创建该任务时传递的形参: D% V# O2 W. O% @, c% p
  62. *        返 回 值: 无: @) a$ h1 q0 y1 W& `6 p/ G* [
  63. *********************************************************************************************************
    # S% O& |( D& ]- v0 K) Z
  64. */. i# a/ J% U1 @' V4 X; A
  65. void vTask1( void *pvParameters )
    * ^7 p2 V2 B5 z
  66. {3 r9 V/ a3 i5 h, Y
  67.     portTickType xDelay, xNextTime;# z0 p4 q! p* m0 y
  68.    
    7 H0 ?& M+ `- [) s  m) K) Y
  69.     //char *pcTaskName = (char*)pvParameters;
    " G# m2 C7 z3 l4 N0 w& C
  70.    
      S8 H8 W$ a% b# |8 ]/ o+ s
  71.     xNextTime = xTaskGetTickCount () + ( portTickType ) 1000;8 w! \$ X3 t2 |' j) [9 ^
  72.         , F8 m' V# L! a5 p
  73.     while(1)
    8 u5 C1 a0 u$ Z
  74.     {
    ' N, _" G; M7 w" H

  75.   M9 w0 H8 m* ~+ p
  76.         bsp_LedToggle(LED1);2 U) U! L, M: P3 j
  77.         //printf("\r\n%s",pcTaskName);% N! r7 J: f" f  N* t# _
  78.         printf("\r\n%s",(char*)(pvParameters));
    5 z: R/ X; n; ~( b1 ^. j' m. x2 j
  79.         /* 用vTaskDelay实现vTaskDelayUntil() */        
    # [( B0 E% _( k( S' W/ ~( J3 |" w
  80.         xDelay = xNextTime - xTaskGetTickCount ();" P( F1 n. D9 y; S7 x- D
  81.         xNextTime += ( portTickType ) 1000;& K9 P9 r# V5 p1 y
  82.   F: @6 L; w7 t
  83.         if( xDelay <= ( portTickType ) 1000 )
    + X5 h2 U( C: y8 f5 i) L' h5 g
  84.         {
    1 }4 e3 a% G- R; V3 \7 B
  85.                 vTaskDelay( xDelay );
    : b8 M6 c+ I' R1 {
  86.         }0 o( S8 u2 L/ b% S. i5 |
  87.     }
    - _; K6 o. I8 c/ V
  88. }/ N( |0 d( ?! V; ?

  89. 9 }" [" P% X+ S( o
  90. /*
    / E3 ]. {+ p% X# z2 z- ^" |
  91. *********************************************************************************************************
    3 t: c% G" [3 c8 t5 I
  92. *        函 数 名: vTask2
    ) F3 c/ z) y1 p+ L6 Y8 V) u
  93. *        功能说明: LED闪烁                1 h5 e% Q3 ^9 G- R
  94. *        形    参:pvParameters 是在创建该任务时传递的形参! |, t5 R- X( _
  95. *        返 回 值: 无
    & d$ X  ~  t; O& c. e  g
  96. *********************************************************************************************************' q) ]3 o# a& B% X" ~# t
  97. */) ?% C- v- \: g4 e! U7 e
  98. void vTask2( void *pvParameters )
    ; O* c9 M9 G( l! Q7 n! N" p
  99. {& {% i' n$ ?  i; {2 R% E' r7 w
  100. 0 N7 r& Z. b+ ~5 L- n8 ^
  101.     portTickType xLastWakeTime;& ]4 ?7 Y" x# t! a7 O
  102.     const portTickType xFrequency = 100;
    # q+ B" z, }& \. V
  103. 3 W% ]6 V; j: \2 H( o+ R; o0 g
  104.     // Initialise the xLastWakeTime variable with the current time.
    8 Y3 u. t* U/ u; S8 T/ ^- e5 m
  105.      xLastWakeTime = xTaskGetTickCount();
    : ^9 D+ `% g, |
  106. $ J; _. k2 k3 Z( [: n5 P
  107.     while(1)3 B& G: [7 r* o& v
  108.     {- H4 ^3 x0 u+ r1 l: q% y
  109.         - e4 f; e8 _6 h8 \0 U6 d
  110.         bsp_LedToggle(LED2);  // Wait for the next cycle.  7 L  C1 G$ Q0 s. V$ h
  111.         vTaskDelayUntil( &xLastWakeTime, xFrequency );
    " ?& U: g7 Y6 F" `
  112.     }' o3 n9 o9 C  P8 ?- j; J, R6 ]* U
  113. }
    ' Y- Y! B) \/ N7 r

  114. 8 \5 ]$ S, A* C3 M
  115. /*; }1 f2 ]3 }. I( v
  116. *********************************************************************************************************! l- {/ @2 {6 P2 H9 O( f. \2 {
  117. *        函 数 名: vTask30 N# ~% ?6 N4 S+ V. P1 d
  118. *        功能说明: LED闪烁               
    5 u& @% N; A7 w3 ^
  119. *        形    参:pvParameters 是在创建该任务时传递的形参2 N' J3 A5 z: n2 A" x
  120. *        返 回 值: 无1 k$ U9 R, G2 U" x# v+ S* V% t
  121. *********************************************************************************************************
    9 L$ w  _5 V; ]# m
  122. */* i7 I; V& J7 W: `0 \4 F5 h
  123. void vTask3( void *pvParameters )+ K' t0 Q  z3 A5 s% N( u  f
  124. {2 G  R* g" p1 I2 s$ c9 t  A. j7 j: j
  125.     while(1)
    1 K# M$ k- a3 y9 z- B* e
  126.     {* j& B4 `" T* ^. e' O/ ]2 |
  127.           /* 挂起自己,可以写NULL或者xHandleTask3句柄,都可以的 */
    , U/ X/ w! [/ ~3 w
  128.           vTaskSuspend( NULL );$ s; z) u. ^9 A7 M( P: ^
  129.           bsp_LedToggle(LED3);
    # Q0 A3 d) i+ \  u, `* h
  130.     }4 w6 i  N" x6 M  E
  131. }4 @* G4 U, H( g! F% p6 A- E4 L

  132. - b) v2 F; \; c' [3 v' g# C
  133. /*9 B0 b2 ^1 v9 ^/ M+ a
  134. *********************************************************************************************************
    " F1 n2 ^3 [* K# b& a& z4 \
  135. *        函 数 名: vTask4. z" P! R* c7 u" W
  136. *        功能说明: LED闪烁               
    + p/ d* x& H1 E. P
  137. *        形    参:pvParameters 是在创建该任务时传递的形参
    . q+ q8 \( ~3 Q1 F8 c0 [5 L7 |
  138. *        返 回 值: 无
    ; G1 d  k! r5 U
  139. *********************************************************************************************************" B0 T3 a9 Q/ Z, I
  140. */
    5 I" y) k  ~: f4 Z% y3 ]  a
  141. void vTask4( void *pvParameters )
    9 \1 a, }: Q# h' n0 U7 _" ?, d
  142. {
    9 E+ q3 e" v. W0 I8 d8 o
  143.         portTickType xLastWakeTime;( i1 `6 z* m0 P8 [# o
  144.     const portTickType xFrequency = 1000;
    4 l! e0 u- M/ ^, o

  145. 6 G1 Z, t/ @, g! z. J( ~8 k
  146.          // Initialise the xLastWakeTime variable with the current time.
      h6 K2 u4 ~# @% h/ i
  147.      xLastWakeTime = xTaskGetTickCount();
    4 D" L. p3 @! J1 L6 `9 F
  148. 2 B1 v+ Q3 }# ~- U& \; `9 l
  149.     while(1)' L9 [2 `2 ]2 }( t8 _3 B9 d
  150.     {
    * ?6 _9 D. p* m8 b) g/ F
  151.         vTaskResume(xHandleTask3);/ r+ x0 [2 U( f6 u+ k8 Y  t
  152.         vTaskList((char *)&pcWriteBuffer);( |+ `/ l! K5 [
  153.         printf("%s\r\n", pcWriteBuffer);
    + B/ s" n2 T* F2 Q
  154. 5 u8 n9 t/ B+ g+ M( v
  155.         vTaskGetRunTimeStats(( char *)&pcWriteBuffer);
    9 s' d0 R  S& \' V$ Y
  156.         printf("%s\r\n", pcWriteBuffer);
    8 C* o; X/ b, U* _! x% k9 U
  157.         vTaskDelayUntil( &xLastWakeTime, xFrequency );. q$ i% h4 Z' R! w: X3 T
  158.     }
    $ a$ j  T' K+ D1 x' T: _
  159. }
    4 l$ b" s* g0 g' ~& e$ N5 A, d* o
  160.   m, }) K5 m; C; u/ ]3 o
  161.   o7 n: L5 _! j8 h" ^
  162. /*
    4 S5 a( l/ F2 ]5 n1 G; }) w2 f
  163. *********************************************************************************************************1 m+ _4 P: ]0 q! U$ j' ^' j
  164. *        函 数 名: AppTaskCreate
    ) }9 O1 m1 c2 f1 ^
  165. *        功能说明: 创建应用任务3 f, V; L( W/ b) i$ r+ A, ?' r
  166. *        形    参:无$ q& ]4 S0 N1 A7 K. m7 R
  167. *        返 回 值: 无# C8 c; @1 F: U: a( s) I
  168. *********************************************************************************************************
    5 O; s" `$ g) d7 P" d6 d0 W4 y
  169. */5 o3 A6 k0 Z( n- G
  170. static void AppTaskCreate (void)
    * }) \8 @/ \5 |* L# K+ T  t4 L
  171. {" a( b: }3 J3 [0 {, h
  172.         /* Create one task. */& b) Y2 b, Q7 U  [# B
  173.     xTaskCreate(    vTask1,     /* Pointer to the function that implements the task.              */# Q/ E6 L' Z/ q1 m4 W- y+ B3 i
  174.                     "Task 1",   /* Text name for the task.  This is to facilitate debugging only. */9 S% p8 c* y5 S. ?) j. d8 X+ ~* o( Q7 d% E
  175.                     500,        /* Stack depth in words.                                          */
    # h+ k% a1 z" S
  176.                     (void*)pcTextForTask1,       /*通过任务参数传入需要打印输出的文本. */; T6 W5 a/ M/ @5 n
  177.                     1,          /* This task will run at priority 1.                              */
    7 K  V& r% e$ h! i5 k
  178.                     NULL );     /* We are not using the task handle.                              */
    - b  i4 T3 ]  q) Q* z0 U; Q. Y' b; X
  179. ; M/ r8 j( c" _# w3 P
  180.     /* Create one task. */
    4 e! v4 F, T& _+ w9 H1 L* ?0 b" o
  181.     xTaskCreate(    vTask2,     /* Pointer to the function that implements the task. */( `3 H5 ]" \6 k- i2 J
  182.                     "Task 2",   /* Text name for the task.  This is to facilitate debugging only. */
    5 m, A2 E% z/ Z+ Z/ J, r6 n* e. K9 O
  183.                     500,        /* Stack depth in words.                                          */  R9 l0 J: c9 Q' I8 ~, B
  184.                     NULL,       /* We are not using the task parameter.                           */
    8 L2 f' w- t4 @: Z8 X) L# J
  185.                     2,          /* This task will run at priority 2.                              */, |2 Q- n5 g) b+ g3 B2 p; v
  186.                     NULL );     /* We are not using the task handle.                              */1 \  f" m& v' H1 }3 O8 e4 M
  187.         0 k  F% M% T; s% x
  188.          /* Create one task. */0 Y& C! J: V# T# x* h
  189.     xTaskCreate(    vTask3,     /* Pointer to the function that implements the task. */* k! J, A2 u; ^* a2 m1 i2 r
  190.                     "Task 3",   /* Text name for the task.  This is to facilitate debugging only. */
    % r; k: l4 A7 @4 r
  191.                     500,        /* Stack depth in words.                                          */
    , A" G; v* t9 s- t
  192.                     NULL,       /* We are not using the task parameter.                           */
    7 D. K9 X2 m; ]# K3 |5 i/ a
  193.                     3,          /* This task will run at priority 2.                              */, \- T5 R9 Q: g% k
  194.                     &xHandleTask3 );   
    ' Q: B4 W' ~* U% ^4 i
  195.         - E, u2 K! g" _; ^9 }5 s  u
  196.         /* Create one task. */) |4 p6 m7 G  `) P  |
  197.     xTaskCreate(    vTask4,     /* Pointer to the function that implements the task. */" M+ z' ^, F0 J- S2 P8 G- e
  198.                     "Task 4",   /* Text name for the task.  This is to facilitate debugging only. */, }5 _% x% d) n  }! d7 c  |
  199.                     500,        /* Stack depth in words.                                          */7 G: G. v* q$ q6 ~! [; M0 Z5 T+ `% a' P
  200.                     NULL,       /* We are not using the task parameter.                           */6 ?) {% `( c  q& S9 G- c1 ?
  201.                     4,          /* This task will run at priority 2.                              */
    & c. X5 Z! [/ b. N: k
  202.                     NULL );     /* We are not using the task handle.                              */                                
    & {) g9 V) P$ |4 t7 P& |
  203. }
    7 n- g2 }( [( k4 @4 z
复制代码
caizhiwei 回答时间:2015-4-27 13:06:52
11:493 回答时间:2015-4-27 22:40:45
多谢分享,学习了。、
hooke 回答时间:2015-4-29 13:55:04
多谢分享,好东西啊
caizhiwei 回答时间:2015-4-29 16:58:45
  1. /*
    ; ?6 U7 P; \9 P. U, w! E
  2. *********************************************************************************************************4 x  ~1 a# T, I1 I: H) ?  |
  3. *        函 数 名: vTask3
    % ^9 v% X- V9 t3 l/ o  q, H
  4. *        功能说明: 接收队列信息               
    % Y. ?0 b, v7 d& ^3 K' z
  5. *        形    参:pvParameters 是在创建该任务时传递的形参
    . a# T% D6 [$ A4 ~( M/ @+ w1 T- [
  6. *        返 回 值: 无
    " G. l( b6 P" ?3 Y
  7. *********************************************************************************************************& A% u- `, }" z
  8. */9 T3 o4 {0 e! ]- e
  9. void vTask3( void *pvParameters )
    ' _! O; k9 _. M5 I0 U" m& ]
  10. {1 t1 d9 F0 D9 f6 g1 w3 g1 S" Q
  11.    uint8_t Count[5];2 `7 O( u+ h0 L( i" l6 ]7 j9 D
  12.     while(1)* o% H" f2 S- F) _
  13.     {
    ; r0 D  j5 L; W! m
  14.                                 
    ) E) }# e7 L$ ]* x
  15.         /* 从队列中获取内容 */     1 u& U' X' v) b
  16.         xQueueReceive( xQueue, &Count[0], portMAX_DELAY); //任务中断并等待队列中可用空间的最大时间
    8 N8 s  D) O6 i
  17.         xQueueReceive( xQueue, &Count[1], portMAX_DELAY);# W, H/ S$ i& Z. \
  18.         xQueueReceive( xQueue, &Count[2], portMAX_DELAY);
    ; A' h# x7 z( O  o# c, O
  19.         xQueueReceive( xQueue, &Count[3], portMAX_DELAY);
    9 Z1 z: I7 _$ p- U
  20.         xQueueReceive( xQueue, &Count[4], portMAX_DELAY);
    # d, E' X& d2 A
  21.         
    9 P1 W( ^, o* N# e1 ]0 Z
  22.         printf("Count0 =  %d\r\n", Count[0]);8 `2 H1 e: \0 V/ m' h
  23.         printf("Count1 =  %d\r\n", Count[1]);
    ; B' Q" y' h6 h* k8 m
  24.         printf("Count2 =  %d\r\n", Count[2]);" J; Q9 h8 B+ ?
  25.         printf("Count3 =  %d\r\n", Count[3]);
    " N* w$ G/ u7 v4 n8 {
  26.         printf("Count4 =  %d\r\n", Count[4]);
    ) q# d! e- V; u( _& [) M- @8 i
  27.     }
    % d, `  t, e4 j# S! D' C% I3 A
  28. }- [7 R7 ^2 q2 P' o

  29. - e# [- @3 e. b) E, d% I. F
  30. /*1 L$ }! b) B' P. ?. {/ P" s
  31. *********************************************************************************************************
    % n2 P9 y# E5 q; \6 R8 R1 ^+ i
  32. *        函 数 名: vTask4
    # R) R) e  n7 r5 p! q+ [- m+ C8 k
  33. *        功能说明: 向队列中填充内容        
    ) k+ b; d" n$ P7 O
  34. *        形    参:pvParameters 是在创建该任务时传递的形参) \5 e" ~0 R! D
  35. *        返 回 值: 无
    , \* e6 R4 }3 c% {1 S0 o
  36. *********************************************************************************************************
    $ V4 O6 v8 g* ^7 v3 x" d) ~. Z
  37. */$ k! Y! W6 a" }, F. H) b" V6 _6 {- }
  38. void vTask4( void *pvParameters )
    ; |& E: p# {. L# s6 I- Q; R
  39. {
    ; [: J; g3 W! i* U% c+ z
  40.     portTickType xLastWakeTime;
    . d# h, \" t9 U8 S9 _3 B' X" k
  41.     const portTickType xFrequency = 1000;, F5 E; t2 C& H) @
  42.     uint8_t ucVar[5] = {0};
    2 v3 V: ^6 q7 o

  43. 9 x5 u9 z9 ~7 e5 g- K5 C
  44.          // Initialise the xLastWakeTime variable with the current time.
    8 R3 V3 G/ [$ H" O; c! E6 z" E
  45.      xLastWakeTime = xTaskGetTickCount();' o; m8 X$ t8 c3 J
  46. $ I, Z+ b+ E- {; M/ I9 {7 z
  47.     while(1), ]1 l2 d' `% R
  48.     {
    0 O* r5 c' }, P1 m5 G9 C, t; s! |
  49.                 ucVar[0]++;: `6 A) a! B/ c: K, r: E" F9 ^! G1 }; a
  50.                 ucVar[1]++;# r+ w3 }2 u" e2 b4 ^0 @
  51.                 ucVar[2]++;
    $ D* G$ y4 I6 `# Y" {+ ^0 R  V7 I
  52.                 ucVar[3]++;
    / i( M/ v8 ], ?
  53.                 ucVar[4]++;$ r6 U! s. q% _" }' W% f5 S
  54.                 : {( l1 b; Y6 i& X5 s
  55.                 if( xQueue ) //!=NULL 如果队列创建成功
    0 r/ x; x6 D" z$ e5 e
  56.                 {
    / @, ^' X1 w5 m+ a" d: l; \
  57. " A* i/ r3 b! a( s1 `. R" j" F
  58.                         //当队列满时,则等待 xTicksToWait个滴答周期后再传递" N% e* w% _- S3 t: ]( I4 F
  59.                         xQueueSend( xQueue, ( void * ) &ucVar[0], ( portTickType ) 10 );
    4 R4 y. f2 s/ U. U
  60.                         xQueueSend( xQueue, ( void * ) &ucVar[1], ( portTickType ) 10 );
    2 }) u% N7 `: P+ R/ R/ s# a. h0 P% v
  61.                         xQueueSend( xQueue, ( void * ) &ucVar[2], ( portTickType ) 10 );8 ]: J- ]( C* G+ g8 j/ x. c  F
  62.                         xQueueSend( xQueue, ( void * ) &ucVar[3], ( portTickType ) 10 );# d+ G8 a2 i/ f2 C9 [% f/ A
  63.                         xQueueSend( xQueue, ( void * ) &ucVar[4], ( portTickType ) 10 );* n2 Q# t2 X2 ]
  64.                 }; W$ |; j5 E; q; I* q
  65.         vTaskDelayUntil( &xLastWakeTime, xFrequency );* Y" W9 b4 I% d) m( R# ~5 g. I
  66.     }( @% ?/ I% ^/ o1 `; S/ B
  67. }2 c2 f7 V9 V4 r6 v  ?0 }: _" X
复制代码

所属标签

相似技术帖

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
人形机器人运动控制、感知与智能配电
半导体创新技术与应用方向
EE架构与软件定义汽车
12V/48V 汽车智能配电(SPD)
区域控制单元(ZCU)与分区架构
关注我们
st-img 微信公众号
st-img 手机版