Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Source_callbacks

Typedefs

typedef int(* policy_cb_get_src_caps_t) (const struct device *dev, const uint32_t **pdos, uint32_t *num_pdos)
 Callback type used to get the Source Capabilities from the Device Policy Manager.
 
typedef enum usbc_snk_req_reply_t(* policy_cb_check_sink_request_t) (const struct device *dev, const uint32_t request_msg)
 Callback type used to check if Sink request is valid.
 
typedef bool(* policy_cb_is_ps_ready_t) (const struct device *dev)
 Callback type used to check if Source Power Supply is ready.
 
typedef bool(* policy_cb_present_contract_is_valid_t) (const struct device *dev, const uint32_t present_contract)
 Callback type used to check if present Contract is still valid.
 
typedef bool(* policy_cb_change_src_caps_t) (const struct device *dev)
 Callback type used to request that a different set of Source Caps be sent to the Sink.
 
typedef void(* policy_cb_set_port_partner_snk_cap_t) (const struct device *dev, const uint32_t *pdos, const int num_pdos)
 Callback type used to report the Capabilities received from a Sink Port Partner.
 
typedef int(* policy_cb_get_src_rp_t) (const struct device *dev, enum tc_rp_value *rp)
 Callback type used to get the Rp value that should be placed on the CC lines.
 
typedef int(* policy_cb_src_en_t) (const struct device *dev, bool en)
 Callback type used to enable VBUS.
 

Detailed Description

Typedef Documentation

◆ policy_cb_change_src_caps_t

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

#include <include/zephyr/usb_c/usbc.h>

Callback type used to request that a different set of Source Caps be sent to the Sink.

Parameters
devUSB-C Connector Instance
Returns
true if a different set of Source Caps is available

◆ policy_cb_check_sink_request_t

typedef enum usbc_snk_req_reply_t(* policy_cb_check_sink_request_t) (const struct device *dev, const uint32_t request_msg)

#include <include/zephyr/usb_c/usbc.h>

Callback type used to check if Sink request is valid.

Parameters
devUSB-C Connector Instance
request_msgrequest message to check
Returns
sink request reply

◆ policy_cb_get_src_caps_t

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

#include <include/zephyr/usb_c/usbc.h>

Callback type used to get the Source Capabilities from the Device Policy Manager.

Parameters
devUSB-C Connector Instance
pdospointer to source capability pdos
num_pdospointer to number of source capability pdos
Returns
0 on success

◆ policy_cb_get_src_rp_t

typedef int(* policy_cb_get_src_rp_t) (const struct device *dev, enum tc_rp_value *rp)

#include <include/zephyr/usb_c/usbc.h>

Callback type used to get the Rp value that should be placed on the CC lines.

Parameters
devUSB-C Connector Instance
rprp value
Returns
0 on success

◆ policy_cb_is_ps_ready_t

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

#include <include/zephyr/usb_c/usbc.h>

Callback type used to check if Source Power Supply is ready.

Parameters
devUSB-C Connector Instance
Returns
true if power supply is ready, else false

◆ policy_cb_present_contract_is_valid_t

typedef bool(* policy_cb_present_contract_is_valid_t) (const struct device *dev, const uint32_t present_contract)

#include <include/zephyr/usb_c/usbc.h>

Callback type used to check if present Contract is still valid.

Parameters
devUSB-C Connector Instance
present_contractpresent contract
Returns
true if present contract is still valid

◆ policy_cb_set_port_partner_snk_cap_t

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

#include <include/zephyr/usb_c/usbc.h>

Callback type used to report the Capabilities received from a Sink Port Partner.

Parameters
devUSB-C Connector Instance
pdospointer to sink cap pdos
num_pdosnumber of sink cap pdos

◆ policy_cb_src_en_t

typedef int(* policy_cb_src_en_t) (const struct device *dev, bool en)

#include <include/zephyr/usb_c/usbc.h>

Callback type used to enable VBUS.

Parameters
devUSB-C Connector Instance
entrue if VBUS should be enabled, else false to disable it
Returns
0 on success