Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Sink_callbacks

Typedefs

typedef int(* policy_cb_get_snk_cap_t) (const struct device *dev, uint32_t **pdos, int *num_pdos)
 Callback type used to get the Sink Capabilities.
 
typedef void(* policy_cb_set_src_cap_t) (const struct device *dev, const uint32_t *pdos, const int num_pdos)
 Callback type used to report the received Port Partner's Source Capabilities.
 
typedef bool(* policy_cb_check_t) (const struct device *dev, const enum usbc_policy_check_t policy_check)
 Callback type used to check a policy.
 
typedef bool(* policy_cb_wait_notify_t) (const struct device *dev, const enum usbc_policy_wait_t wait_notify)
 Callback type used to notify Device Policy Manager of WAIT message reception.
 
typedef void(* policy_cb_notify_t) (const struct device *dev, const enum usbc_policy_notify_t policy_notify)
 Callback type used to notify Device Policy Manager of a policy change.
 
typedef uint32_t(* policy_cb_get_rdo_t) (const struct device *dev)
 Callback type used to get the Request Data Object (RDO)
 
typedef bool(* policy_cb_is_snk_at_default_t) (const struct device *dev)
 Callback type used to check if the sink power supply is at the default level.
 

Detailed Description

Typedef Documentation

◆ policy_cb_check_t

typedef bool(* policy_cb_check_t) (const struct device *dev, const enum usbc_policy_check_t policy_check)

#include <zephyr/usb_c/usbc.h>

Callback type used to check a policy.

Parameters
devUSB-C Connector Instance
policy_checkpolicy to check
Returns
true if policy is currently allowed by the device policy manager

◆ policy_cb_get_rdo_t

typedef uint32_t(* policy_cb_get_rdo_t) (const struct device *dev)

#include <zephyr/usb_c/usbc.h>

Callback type used to get the Request Data Object (RDO)

Parameters
devUSB-C Connector Instance
Returns
RDO

◆ policy_cb_get_snk_cap_t

typedef int(* policy_cb_get_snk_cap_t) (const struct device *dev, uint32_t **pdos, int *num_pdos)

#include <zephyr/usb_c/usbc.h>

Callback type used to get the Sink Capabilities.

Parameters
devUSB-C Connector Instance
pdospointer where pdos are stored
num_pdospointer where number of pdos is stored
Returns
0 on success

◆ policy_cb_is_snk_at_default_t

typedef bool(* policy_cb_is_snk_at_default_t) (const struct device *dev)

#include <zephyr/usb_c/usbc.h>

Callback type used to check if the sink power supply is at the default level.

Parameters
devUSB-C Connector Instance
Returns
true if power supply is at default level

◆ policy_cb_notify_t

typedef void(* policy_cb_notify_t) (const struct device *dev, const enum usbc_policy_notify_t policy_notify)

#include <zephyr/usb_c/usbc.h>

Callback type used to notify Device Policy Manager of a policy change.

Parameters
devUSB-C Connector Instance
policy_notifypolicy notification

◆ policy_cb_set_src_cap_t

typedef void(* policy_cb_set_src_cap_t) (const struct device *dev, const uint32_t *pdos, const int num_pdos)

#include <zephyr/usb_c/usbc.h>

Callback type used to report the received Port Partner's Source Capabilities.

Parameters
devUSB-C Connector Instance
pdospointer to the partner's source pdos
num_pdosnumber of source pdos

◆ policy_cb_wait_notify_t

typedef bool(* policy_cb_wait_notify_t) (const struct device *dev, const enum usbc_policy_wait_t wait_notify)

#include <zephyr/usb_c/usbc.h>

Callback type used to notify Device Policy Manager of WAIT message reception.

Parameters
devUSB-C Connector Instance
wait_notifywait notification
Returns
return true if the PE should wait and resend the message