added error when not selecting hwe or hre
This commit is contained in:
@@ -136,6 +136,9 @@ class Decoder(srd.Decoder):
|
|||||||
have_hre = self.has_channel(21)
|
have_hre = self.has_channel(21)
|
||||||
hre_active_low = self.options['hre_polarity'] == 'low'
|
hre_active_low = self.options['hre_polarity'] == 'low'
|
||||||
|
|
||||||
|
if not have_hwe and not have_hre:
|
||||||
|
raise ChannelError('Either hre or hwe must be set!')
|
||||||
|
|
||||||
cs_active_low = self.options['cs_polarity'] == 'low'
|
cs_active_low = self.options['cs_polarity'] == 'low'
|
||||||
cmd_active_low = self.options['cmd_polarity'] == 'low'
|
cmd_active_low = self.options['cmd_polarity'] == 'low'
|
||||||
rst_active_low = self.options['rst_polarity'] == 'low'
|
rst_active_low = self.options['rst_polarity'] == 'low'
|
||||||
|
|||||||
Reference in New Issue
Block a user