Using srd.SRD_OUTPUT_ANN is unneeded, srd.OUTPUT_ANN is better/shorter.
self.state = None
def start(self, metadata):
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'ddc')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'ddc')
def decode(self, start_sample, end_sample, i2c_data):
try:
self.oldsda = None
def start(self, metadata):
- self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'i2c')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'i2c')
+ self.out_proto = self.add(srd.OUTPUT_PROTO, 'i2c')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'i2c')
def report(self):
pass
self.out = []
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'mx25lxx05d')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'mx25lxx05d')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'mx25lxx05d')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'mx25lxx05d')
def report(self):
pass
self.databytecount = 0
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'nunchuk')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'nunchuk')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'nunchuk')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'nunchuk')
def report(self):
pass
self.cmd = ''
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'pan1321')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'pan1321')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'pan1321')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'pan1321')
def report(self):
pass
self.bytesreceived = 0
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'spi')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'spi')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'spi')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'spi')
def report(self):
return 'SPI: %d bytes received' % self.bytesreceived
def start(self, metadata):
self.rate = metadata['samplerate']
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'usb')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'usb')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'usb')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'usb')
if self.rate < 48000000:
raise Exception("Sample rate not sufficient for USB decoding")
# Initialise decoder state.
self.lastsample = None
def start(self, metadata):
- # self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'transitioncounter')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'transitioncounter')
+ # self.out_proto = self.add(srd.OUTPUT_PROTO, 'transitioncounter')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'transitioncounter')
def report(self):
pass
def start(self, metadata):
self.samplerate = metadata['samplerate']
- self.out_proto = self.add(srd.SRD_OUTPUT_PROTO, 'uart')
- self.out_ann = self.add(srd.SRD_OUTPUT_ANN, 'uart')
+ self.out_proto = self.add(srd.OUTPUT_PROTO, 'uart')
+ self.out_ann = self.add(srd.OUTPUT_ANN, 'uart')
# TODO
### self.baudrate = metadata['baudrate']
return NULL;
/* expose output types as symbols in the sigrokdecode module */
- if(PyModule_AddObject(mod, "SRD_OUTPUT_ANN",
+ if(PyModule_AddObject(mod, "OUTPUT_ANN",
PyLong_FromLong(SRD_OUTPUT_ANN)) == -1)
return NULL;
- if(PyModule_AddObject(mod, "SRD_OUTPUT_PROTO",
+ if(PyModule_AddObject(mod, "OUTPUT_PROTO",
PyLong_FromLong(SRD_OUTPUT_PROTO)) == -1)
return NULL;
- if(PyModule_AddObject(mod, "SRD_OUTPUT_BINARY",
+ if(PyModule_AddObject(mod, "OUTPUT_BINARY",
PyLong_FromLong(SRD_OUTPUT_BINARY)) == -1)
return NULL;