Э-э-э... Мы про одно и то-жэ говорим? Я дал код и листинг для
CH32V203. Вот для 003. 00000276 <sendFIRtoDAC>:
int i;
uint16_t mask;
mask=0x8000;
for(i=0;i<8;i++)
{
GPIOC->BSHR=patternZeroSet;
276: 000c0737 lui a4,0xc0
{
27a: 47a1 li a5,8
GPIOC->BSHR=patternZeroSet;
27c: 400116b7 lui a3,0x40011
280: 0709 addi a4,a4,2
GPIOC->BSHR=patternZeroFix;
282: 000e0637 lui a2,0xe0
GPIOC->BSHR=patternZeroSet;
286: ca98 sw a4,16(a3)
GPIOC->BSHR=patternZeroFix;
288: ca90 sw a2,16(a3)
28a: 17fd addi a5,a5,-1
for(i=0;i<8;i++)
28c: ffed bnez a5,286 <sendFIRtoDAC+0x10>
GPIOC->BSHR=patternOneSet;
GPIOC->BSHR=patternOneFix;
}
else
{
GPIOC->BSHR=patternZeroSet;
28e: 000c0637 lui a2,0xc0
GPIOC->BSHR=patternOneSet;
292: 000805b7 lui a1,0x80
GPIOC->BSHR=patternOneFix;
296: 000a0337 lui t1,0xa0
29a: 4741 li a4,16
mask=0x8000;
29c: 66a1 lui a3,0x8
GPIOC->BSHR=patternZeroSet;
29e: 400117b7 lui a5,0x40011
2a2: 0609 addi a2,a2,2
GPIOC->BSHR=patternOneSet;
2a4: 0599 addi a1,a1,6
GPIOC->BSHR=patternOneFix;
2a6: 0311 addi t1,t1,4
if((FIRdata&mask)!=0)
2a8: 00d572b3 and t0,a0,a3
2ac: 00028f63 beqz t0,2ca <sendFIRtoDAC+0x54>
GPIOC->BSHR=patternOneSet;
2b0: cb8c sw a1,16(a5)
GPIOC->BSHR=patternOneFix;
2b2: 0067a823 sw t1,16(a5) # 40011010 <__global_pointer$+0x20010810>
GPIOC->BSHR=patternZeroFix;
}
mask=mask>>1;
2b6: 177d addi a4,a4,-1
2b8: 8285 srli a3,a3,0x1
for(i=0;i<16;i++)
2ba: f77d bnez a4,2a8 <sendFIRtoDAC+0x32>
}
GPIOC->BSHR=pattern1Off;
2bc: 000607b7 lui a5,0x60
2c0: 40011737 lui a4,0x40011
2c4: 07a1 addi a5,a5,8
2c6: cb1c sw a5,16(a4)
}
2c8: 8082 ret
GPIOC->BSHR=patternZeroSet;
2ca: cb90 sw a2,16(a5)
GPIOC->BSHR=patternZeroFix;
2cc: 000e02b7 lui t0,0xe0
2d0: 0057a823 sw t0,16(a5) # 60010 <_data_lma+0x5fb6c>
2d4: b7cd j 2b6 <sendFIRtoDAC+0x40>