## 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
return 64 + len(self.data)
class Decoder(srd.Decoder):
- api_version = 2
+ api_version = 3
id = 'usb_request'
name = 'USB request'
longname = 'Universal Serial Bus (LS/FS) transaction/request'
self.handle_request(request_started, request_end)
# CONTROL, SETUP stage
- elif request['type'] == None and self.transaction_type == 'SETUP':
+ elif request['type'] is None and self.transaction_type == 'SETUP':
request['setup_data'] = self.transaction_data
request['wLength'] = struct.unpack('<H',
bytes(self.transaction_data[6:8]))[0]