虽然按文档,反馈数据应该上升沿采样,但是实际上发现下降沿采样更准确.
This commit is contained in:
+3
-2
@@ -288,8 +288,7 @@ class Decoder(srd.Decoder):
|
||||
clk, sync, data, data2, data3, data4, stat = self.wait({0: 'e'})
|
||||
|
||||
if clk == 1:# rising edge
|
||||
bit_value3 = data3
|
||||
bit_value4 = data4
|
||||
|
||||
stat_value = stat
|
||||
bit_es = self.samplenum
|
||||
if bit_ss is not None:
|
||||
@@ -298,6 +297,8 @@ class Decoder(srd.Decoder):
|
||||
else:# falling edge
|
||||
bit_value = data
|
||||
bit_value2 = data2
|
||||
bit_value3 = data3
|
||||
bit_value4 = data4
|
||||
sync_value = sync
|
||||
|
||||
bit2_es = self.samplenum
|
||||
|
||||
Reference in New Issue
Block a user