## along with this program; if not, see <http://www.gnu.org/licenses/>.
##
-# EDID protocol decoder
-
# TODO:
# - EDID < 1.3
# - add short annotations
(16, 9),
]
-# Annotation types
+# Annotation classes
ANN_FIELDS = 0
ANN_SECTIONS = 1
class Decoder(srd.Decoder):
- api_version = 1
+ api_version = 2
id = 'edid'
name = 'EDID'
longname = 'Extended Display Identification Data'
license = 'gplv3+'
inputs = ['i2c']
outputs = ['edid']
- probes = []
- optional_probes = []
- options = {}
- annotations = [
- ['EDID fields', 'EDID structure fields'],
- ['EDID sections', 'EDID structure sections'],
- ]
+ annotations = (
+ ('fields', 'EDID structure fields'),
+ ('sections', 'EDID structure sections'),
+ )
def __init__(self, **kwargs):
self.state = None
self.cache = []
def start(self):
- self.out_ann = self.add(srd.OUTPUT_ANN, 'edid')
-
- def report(self):
- pass
+ self.out_ann = self.register(srd.OUTPUT_ANN)
def decode(self, ss, es, data):
cmd, data = data
else:
if self.cache[i+2] == 0 or self.cache[i+4] == 0:
self.decode_descriptor(i)
-