@@ -63,9 +63,9 @@ extern "C" {
63
63
64
64
/** @brief BC1.2 device role. */
65
65
enum bc12_role {
66
- BC12_DISCONNECTED ,
67
- BC12_PORTABLE_DEVICE ,
68
- BC12_CHARGING_PORT ,
66
+ BC12_DISCONNECTED , /**< No BC1.2 device connected */
67
+ BC12_PORTABLE_DEVICE , /**< BC1.2 device is a portable device */
68
+ BC12_CHARGING_PORT , /**< BC1.2 device is a charging port */
69
69
};
70
70
71
71
/** @brief BC1.2 charging partner type. */
@@ -88,25 +88,33 @@ enum bc12_type {
88
88
89
89
/**
90
90
* @brief BC1.2 detected partner state.
91
- *
92
- * @param bc12_role Current role of the BC1.2 device.
93
- * @param type Charging partner type. Valid when bc12_role is BC12_PORTABLE_DEVICE.
94
- * @param current_ma Current, in uA, that the charging partner provides. Valid when bc12_role is
95
- * BC12_PORTABLE_DEVICE.
96
- * @param voltage_mv Voltage, in uV, that the charging partner provides. Valid when bc12_role is
97
- * BC12_PORTABLE_DEVICE.
98
- * @param pd_partner_connected True if a PD partner is currently connected. Valid when bc12_role is
99
- * BC12_CHARGING_PORT.
100
91
*/
101
92
struct bc12_partner_state {
93
+ /** Current role of the BC1.2 device. */
102
94
enum bc12_role bc12_role ;
103
95
union {
104
96
struct {
97
+ /**
98
+ * Charging partner type.
99
+ * Valid when @ref bc12_role is @ref BC12_PORTABLE_DEVICE.
100
+ */
105
101
enum bc12_type type ;
102
+ /**
103
+ * Current, in uA, that the charging partner provides.
104
+ * Valid when @ref bc12_role is @ref BC12_PORTABLE_DEVICE.
105
+ */
106
106
int current_ua ;
107
+ /**
108
+ * Voltage, in uV, that the charging partner provides.
109
+ * Valid when @ref bc12_role is @ref BC12_PORTABLE_DEVICE.
110
+ */
107
111
int voltage_uv ;
108
112
};
109
113
struct {
114
+ /**
115
+ * True if a PD partner is currently connected.
116
+ * Valid when @ref bc12_role is @ref BC12_CHARGING_PORT.
117
+ */
110
118
bool pd_partner_connected ;
111
119
};
112
120
};
0 commit comments