Skip to content

Commit

Permalink
pbdrv/usb: freeze pbdrv_usb_bcd_t values
Browse files Browse the repository at this point in the history
Since these are part of the API now, we don't want the values to change.
  • Loading branch information
dlech authored Nov 16, 2024
1 parent b3fe921 commit 702e96c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/pbio/include/pbdrv/usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@
* Indicates battery charging capabilites that were detected on a USB port.
*/
typedef enum {
// NOTE: These values are part of the MicroPython API, don't change the numbers.

/** The USB cable is not connected (no VBUS). */
PBDRV_USB_BCD_NONE,
PBDRV_USB_BCD_NONE = 0,
/** The USB cable is connected to a non-standard charger or PS/2 port. */
PBDRV_USB_BCD_NONSTANDARD,
PBDRV_USB_BCD_NONSTANDARD = 1,
/** The USB cable is connected to standard downstream port. */
PBDRV_USB_BCD_STANDARD_DOWNSTREAM,
PBDRV_USB_BCD_STANDARD_DOWNSTREAM = 2,
/** The USB cable is connected to charging downstream port. */
PBDRV_USB_BCD_CHARGING_DOWNSTREAM,
PBDRV_USB_BCD_CHARGING_DOWNSTREAM = 3,
/** The USB cable is connected to dedicated charging port. */
PBDRV_USB_BCD_DEDICATED_CHARGING,
PBDRV_USB_BCD_DEDICATED_CHARGING = 4,
} pbdrv_usb_bcd_t;

#if PBDRV_CONFIG_USB
Expand Down

0 comments on commit 702e96c

Please sign in to comment.