diff --git a/i80/pd.py b/i80/pd.py index e06b9e4..9043444 100644 --- a/i80/pd.py +++ b/i80/pd.py @@ -136,6 +136,9 @@ class Decoder(srd.Decoder): have_hre = self.has_channel(21) 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' cmd_active_low = self.options['cmd_polarity'] == 'low' rst_active_low = self.options['rst_polarity'] == 'low'