|
请问,omapl138 中 sysbios 的timer 组件如何设置中断的优先级?程序如下,该怎么配置呢?
, g0 p* \1 w# _ {1 k& g" w# Nvoid ad7606_start(ad7606 *ad, unsigned int rate) {
: e& B9 c6 y7 _, V, V3 _7 v' {/ e2 z9 H9 }9 W: B2 O% F. G
// 创建定时器7 {0 Z5 m( X8 R
Timer_Params timerParams;
) V: x4 b7 m" |2 n" L/ u0 t3 { Error_Block eb;
7 { y6 o+ N# k. W* g" u: Q: o% b2 a& t7 l# a" P4 W" V
// 初始化错误块5 [ b: }& y) c% l. P) Y- P. |
Error_init(&eb);
0 \8 R5 a7 K9 J( x g" ?; w4 p2 i2 j // 初始化参数
2 ~# s1 S( N" o5 \ y* g Timer_Params_init(&timerParams);
% r( ]& x8 G- ^
" H) W- E: ~' r/ _ // 配置周期& a; |1 T6 w5 v: l
timerParams.period = 599 ;
) n. t- L% C7 a- l5 H) J6 H+ `0 F timerParams.periodType = Timer_PeriodType_COUNTS ;
% k) a# Q; [0 _ C% e) ~6 n
" r. I. t6 E( l$ `7 p* y // 实例化定时器) D, }6 t& K# e/ p
Timer2 = Timer_create(2, ad7606_on_ticked, &timerParams, &eb); ~# i0 O' G5 S" [
if(Timer2 == NULL)
" c. E- N( I0 A4 X, l+ u. R {
- I" ~" P4 n, }5 [0 Y LOG_INFO("Timer2 not start。。。。");. w; _2 D; _. {7 H0 P
}
! V" m1 ~$ p& {4 j1 O) [. i9 c+ e1 g9 w# f+ f7 Z. a; T
Timer_start(Timer2);" a& K+ R ~) ]
4 \( s& w4 [( J B
LOG_INFO("Timer2 start。。。。");: k: r: ]: J9 w4 G8 |/ {
& o. W8 B/ u0 J; @& U% g( @3 N- q8 q
}' o& u5 O i- M
4 w h- V8 k9 t+ x `) \
2 _5 s/ m( V: v* S
|
|