## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+## along with this program; if not, see <http://www.gnu.org/licenses/>.
##
import sigrokdecode as srd
class Decoder(srd.Decoder):
- api_version = 1
+ api_version = 3
id = 'i2cdemux'
name = 'I²C demux'
longname = 'I²C demultiplexer'
license = 'gplv2+'
inputs = ['i2c']
outputs = [] # TODO: Only known at run-time.
- probes = []
- optional_probes = []
- options = {}
- annotations = []
+ tags = ['Util']
- def __init__(self, **kwargs):
+ def __init__(self):
+ self.reset()
+
+ def reset(self):
self.packets = [] # Local cache of I²C packets
self.slaves = [] # List of known slave addresses
self.stream = -1 # Current output stream
self.stream = -1
else:
pass # Do nothing, only add the I²C packet to our cache.
-