Zephyr API 3.6.99
Loading...
Searching...
No Matches
usb_bc12.h File Reference

Public APIs for the USB BC1.2 battery charging detect drivers. More...

#include <zephyr/device.h>
#include <zephyr/syscalls/usb_bc12.h>

Go to the source code of this file.

Data Structures

struct  bc12_partner_state
 BC1.2 detected partner state. More...
 

Macros

BC1.2 constants
#define BC12_CHARGER_VOLTAGE_UV   5000 * 1000
 BC1.2 USB charger voltage.
 
#define BC12_CHARGER_MIN_CURR_UA   2500
 BC1.2 USB charger minimum current.
 
#define BC12_CHARGER_MAX_CURR_UA   1500 * 1000
 BC1.2 USB charger maximum current.
 

Typedefs

typedef void(* bc12_callback_t) (const struct device *dev, struct bc12_partner_state *state, void *user_data)
 BC1.2 callback for charger configuration.
 

Enumerations

enum  bc12_role { BC12_DISCONNECTED , BC12_PORTABLE_DEVICE , BC12_CHARGING_PORT }
 BC1.2 device role. More...
 
enum  bc12_type {
  BC12_TYPE_NONE , BC12_TYPE_SDP , BC12_TYPE_DCP , BC12_TYPE_CDP ,
  BC12_TYPE_PROPRIETARY , BC12_TYPE_UNKNOWN , BC12_TYPE_COUNT
}
 BC1.2 charging partner type. More...
 

Functions

int bc12_set_role (const struct device *dev, enum bc12_role role)
 Set the BC1.2 role.
 
int bc12_set_result_cb (const struct device *dev, bc12_callback_t cb, void *user_data)
 Register a callback for BC1.2 results.
 

Detailed Description

Public APIs for the USB BC1.2 battery charging detect drivers.