TA的每日心情 | 郁闷 2022-12-30 15:15 |
---|
签到天数: 1 天 [LV.1]初来乍到
|
int result = 0; //define receive variable
\0 D: X, m; o0 Xif(AuXR1&(1<<2)) //ADC_RES store result high 2bits r x0 t, x, b+ W' S, V
{: H9 n. ~ N s2 t ?1 U3 ~
//result = ADC_RES << 8 + ADC_RESL;
6 V5 ^. u8 n6 K$ ~' ` result = ADC_RES;
: }4 ^7 d) _6 _. f result << = 8;& B/ n ~8 c3 \3 T/ {* A% c
result = result + ADC_RESL;$ _1 X+ D0 I3 A9 O* B9 `5 O
}
% P' r0 ?3 b7 K' jelse //ADC_RES store result high 8bits2 J& M" w5 |9 u+ L; q E
{
# L7 x" D) e; f# h) i2 ?7 q //result = ADC_RES << 2 + ADC_RESL;" S9 {) T8 w. o: B( m
result = ADC_RES;8 _: z' s+ M v8 p7 B: U! a6 Z8 {
result << = 2;
1 ^$ g5 d8 X% t5 L" F4 P result = result + ADC_RESL;
3 e3 I& p! _" T6 x, k" h} |
|