From 3da7aa53b459179ba88b224693e88ca4bd765355 Mon Sep 17 00:00:00 2001 From: Matthew Howard Date: Wed, 14 May 2025 18:52:27 +0100 Subject: [PATCH] Correct _PDO_RESPONSE_CODES list According to the HUSB238 datasheet the value 010 in the PD_RESPONSE section of the PD_STATUS1 register should be reserved. Updated the _PDO_RESPONSE_CODES list to account for this, so that when the list is accessed using the self.response value the correct response string is returned. --- adafruit_husb238.py | 1 + 1 file changed, 1 insertion(+) diff --git a/adafruit_husb238.py b/adafruit_husb238.py index 4743222..27ccb9d 100644 --- a/adafruit_husb238.py +++ b/adafruit_husb238.py @@ -143,6 +143,7 @@ class Adafruit_HUSB238: _PDO_RESPONSE_CODES = [ "NO RESPONSE", None, # Success + None, # Reserved "INVALID COMMAND OR ARGUMENT", "COMMAND NOT SUPPORTED", "TRANSACTION FAILED, NO GOOD CRC",