## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
longname = 'Display Data Channel'
desc = 'A protocol for communication between computers and displays.'
longdesc = ''
license = 'gplv3+'
inputs = ['i2c']
longname = 'Display Data Channel'
desc = 'A protocol for communication between computers and displays.'
longdesc = ''
license = 'gplv3+'
inputs = ['i2c']
]
def __init__(self, **kwargs):
self.state = None
def start(self, metadata):
]
def __init__(self, **kwargs):
self.state = None
def start(self, metadata):
- self.out_ann = self.add(srd.OUTPUT_ANN, 'ddc')
-
- def report(self):
- pass
+ self.out_proto = self.add(srd.OUTPUT_PROTO, 'ddc2')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'ddc2')
def decode(self, ss, es, data):
try:
def decode(self, ss, es, data):
try:
if cmd == 'DATA READ':
# There shouldn't be anything but data reads on this
# address, so ignore everything else.
if cmd == 'DATA READ':
# There shouldn't be anything but data reads on this
# address, so ignore everything else.
self.put(ss, es, self.out_ann, [0, ['0x%.2x' % data]])
else:
raise Exception('Invalid state: %s' % self.state)
self.put(ss, es, self.out_ann, [0, ['0x%.2x' % data]])
else:
raise Exception('Invalid state: %s' % self.state)