Zephyr Project API 3.7.0
A Scalable Open Source RTOS
|
BC1.2 backend emulator APIs. More...
Functions | |
static int | bc12_emul_set_charging_partner (const struct emul *target, enum bc12_type partner_type) |
Set the charging partner type connected to the BC1.2 device. | |
static int | bc12_emul_set_pd_partner (const struct emul *target, bool connected) |
Set the portable device partner state. | |
BC1.2 backend emulator APIs.
|
inlinestatic |
#include <include/zephyr/drivers/usb/emul_bc12.h>
Set the charging partner type connected to the BC1.2 device.
The corresponding BC1.2 emulator updates the vendor specific registers to simulate connection of the specified charging partner type. The emulator also generates an interrupt for processing by the real driver, if supported.
target | Pointer to the emulator structure for the BC1.2 emulator instance. |
partner_type | The simulated partner type. Set to BC12_TYPE_NONE to disconnect the charging partner. |
0 | If successful. |
-EINVAL | if the partner type is not supported. |
#include <include/zephyr/drivers/usb/emul_bc12.h>
Set the portable device partner state.
The corresponding BC1.2 emulator updates the vendor specific registers to simulate connection or disconnection of a portable device partner. The emulator also generates an interrupt for processing by the real driver, if supported.
target | Pointer to the emulator structure for the BC1.2 emulator instance. |
connected | If true, emulate a connection of a portable device partner. If false, emulate a disconnect event. |
0 | If successful. |
-EINVAL | if the connection/disconnection of PD partner is not supported. |