mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +08:00
Merge pull request #647 from yunyaobaihong/demo
mipi rffe multilanguage and can&canfd falling edge
This commit is contained in:
commit
b0a0ed966d
@ -550,7 +550,7 @@ class Decoder(srd.Decoder):
|
||||
# State machine.
|
||||
if self.state == 'IDLE':
|
||||
# Wait for a dominant state (logic 0) on the bus.
|
||||
(can_rx,) = self.wait({0: 'l'})
|
||||
(can_rx,) = self.wait({0: 'f'})
|
||||
self.sof = self.samplenum
|
||||
self.dom_edge_seen(force = True)
|
||||
self.state = 'GET BITS'
|
||||
|
@ -42,8 +42,8 @@ class Decoder(srd.Decoder):
|
||||
{'id': 'can_rx', 'name': 'CAN', 'desc': 'CAN bus line', 'idn':'dec_can_chan_can_rx'},
|
||||
)
|
||||
options = (
|
||||
{'id': 'bitrate', 'desc': 'bitrate (bits/s)', 'default': 1000000,'idn':'dec_can_opt_bitrate'},
|
||||
{'id': 'sample_point', 'desc': 'Sample point (%)', 'default': 70.0,'idn':'dec_can_opt_sample_point'},
|
||||
{'id': 'bitrate', 'desc': 'bitrate (bits/s)', 'default': 1000000, 'idn':'dec_can_opt_bitrate'},
|
||||
{'id': 'sample_point', 'desc': 'Sample point (%)', 'default': 70.0, 'idn':'dec_can_opt_sample_point'},
|
||||
)
|
||||
annotations = (
|
||||
('data', 'CAN payload data'),
|
||||
@ -85,7 +85,7 @@ class Decoder(srd.Decoder):
|
||||
def metadata(self, key, value):
|
||||
if key == srd.SRD_CONF_SAMPLERATE:
|
||||
self.samplerate = value
|
||||
self.bit_width = float(self.samplerate) / float(self.options['nominal_bitrate'])
|
||||
self.bit_width = float(self.samplerate) / float(self.options['bitrate'])
|
||||
self.sample_point = (self.bit_width / 100.0) * self.options['sample_point']
|
||||
|
||||
# Generic helper for CAN bit annotations.
|
||||
@ -448,7 +448,7 @@ class Decoder(srd.Decoder):
|
||||
# State machine.
|
||||
if self.state == 'IDLE':
|
||||
# Wait for a dominant state (logic 0) on the bus.
|
||||
(can_rx,) = self.wait({0: 'l'})
|
||||
(can_rx,) = self.wait({0: 'f'})
|
||||
self.sof = self.samplenum
|
||||
self.dom_edge_seen(force = True)
|
||||
self.state = 'GET BITS'
|
||||
|
@ -84,12 +84,12 @@ class Decoder(srd.Decoder):
|
||||
outputs = ['mipi_rffe']
|
||||
tags = ['Embedded/industrial']
|
||||
channels = (
|
||||
{'id': 'sclk', 'type': 8, 'name': 'SCLK', 'desc': 'Serial clock line'},
|
||||
{'id': 'sdata', 'type': 108, 'name': 'SDATA', 'desc': 'Serial data line'},
|
||||
{'id': 'sclk', 'type': 8, 'name': 'SCLK', 'desc': 'Serial clock line', 'idn':'dec_mipi_rffe_chan_sclk'},
|
||||
{'id': 'sdata', 'type': 108, 'name': 'SDATA', 'desc': 'Serial data line', 'idn':'dec_mipi_rffe_chan_sdata'},
|
||||
)
|
||||
options = (
|
||||
{'id': 'error_display', 'desc': 'Error display options',
|
||||
'default': 'display', 'values': ('display', 'not_display')},
|
||||
{'id': 'error_display', 'desc': 'Error display options',
|
||||
'default': 'display', 'values': ('display', 'not_display'), 'idn':'dec_mipi_rffe_opt_error_display'},
|
||||
)
|
||||
annotations = (
|
||||
('7', 'ssc', 'Sequence Start Condition'),
|
||||
|
Loading…
x
Reference in New Issue
Block a user