|
|
您好,请问omapl138 c程序中嵌入汇编问题。下面代码汇编程序是怎样的呢?( F4 w( m7 `2 e$ t; x( o# A
1 c0 Z& ?, m; Y Mint16_t raw ;
# R! O3 Y; Q7 C3 s# k+ fdouble tempin = 0.0 ;
3 h" \+ @0 c0 w2 K3 Adouble tempout = 0.0 ;
, x- R* X& t7 t* g) y0 q. e7 y# m: w! D! [# o( B( ]7 r _
float alpha = 1.8 ;
/ x3 ^8 G8 H" @float gamma = 1.6 ;
( J3 H5 N5 E7 b: O) h; W3 @7 _# ^! D. C. Y* f
double InHistory = 0 ;
2 S/ R1 [2 C J6 ]" H. h- vdouble OutHistoy = 0 ;: h3 q; d9 v+ U$ U( {$ _/ @
# U% b ~) X; [% g7 f! t$ ~ G* k9 Qtempin = (float)raw * 10.0 / 65536.0 ;( e' k% s, h. E( ` K6 y) G2 k
tempout = alpha*(InHistory + tempin) + gamma*OutHistoy ;/ w* Z7 K4 |& |# T& p5 k- H
InHistory = tempin;
# J( D. r* J+ jOutHistoy = tempout ;
6 }# ]9 t- P. X/ B: Z$ g
r7 j" Q% O5 G' O6 E& t |
|