![]() |
RA Flexible Software Package Documentation
Release v6.2.0
|
|
Interface for USB Type-C functions.
The USB Type-C interface provides USB functionality.
Data Structures | |
| struct | usb_typec_callback_args_t |
| struct | usb_typec_cfg_t |
| struct | usb_typec_api_t |
| struct | usb_typec_instance_t |
Typedefs | |
| typedef void | usb_typec_ctrl_t |
Enumerations | |
| enum | usb_typec_mode_t |
| enum | usb_typec_pmode_t |
| enum | usb_typec_plug_t |
| enum | usb_typec_connection_status_t |
| enum | usb_typec_vbus_status_t |
| enum | usb_typec_status_t |
| enum | usb_typec_ccs_status_t |
| struct usb_typec_callback_args_t |
Callback function parameter data
| Data Fields | ||
|---|---|---|
| uint32_t | module_number | USB Type-C module number. |
| usb_typec_status_t | status | Status code. |
| usb_typec_plug_t | plug | Connection of Plug Orientation. |
| usb_typec_connection_status_t | connection_status | Status of Connection Statue Machine. |
| usb_typec_vbus_status_t | vbus_status | Status of VBUS. |
| void * | p_context | Placeholder for user data. Set in usb_typec_api_t::open function in usb_typec_cfg_t. |
| struct usb_typec_cfg_t |
USB Type-C configuration.
| Data Fields | ||
|---|---|---|
| uint32_t | module_number | USB Type-C module number. |
| usb_typec_mode_t | usb_typec_mode | Sink Only/USB 2.0 Only Sink Mode. |
| usb_typec_pmode_t | usb_typec_pmode | Detect Default USB Source/Detect Default USB and 1.5A Source/Detect Default USB, 1.5A and 3.0A Source. |
| IRQn_Type | irq_typec_cci | USBCC_CCI interrupt number storage variable. |
| IRQn_Type | irq_typec_ccs | USBCC_CCS interrupt number storage variable. |
| uint32_t | ipl_typec_cci | Variable to store the interrupt priority of USBCC_CCI IR. |
| uint32_t | ipl_typec_ccs | Variable to store the interrupt priority of USBCC_CCS IR. |
| usb_typec_callback_t * | p_callback | Type-C Callback. |
| void * | p_context | Other Context. |
| void const * | p_extend | Pointer to extended configuration by instance of interface. |
| struct usb_typec_api_t |
Functions implemented at the HAL layer will follow this API.
Data Fields | |
| fsp_err_t(* | open )(usb_typec_ctrl_t *const p_ctrl, usb_typec_cfg_t const *const p_cfg) |
| fsp_err_t(* | close )(usb_typec_ctrl_t *const p_ctrl) |
| fsp_err_t(* | infoGet )(usb_typec_ctrl_t *const p_ctrl, usb_typec_info_t *const p_info) |
| fsp_err_t(* | lowPowerModeSet )(usb_typec_ctrl_t *const p_ctrl, usb_typec_ccs_status_t status) |
| fsp_err_t(* usb_typec_api_t::open) (usb_typec_ctrl_t *const p_ctrl, usb_typec_cfg_t const *const p_cfg) |
Start the USB Type-C module
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_cfg | Pointer to configuration structure. |
| fsp_err_t(* usb_typec_api_t::close) (usb_typec_ctrl_t *const p_ctrl) |
Stop the USB Type-C module
| [in] | p_ctrl | Pointer to control structure. |
| fsp_err_t(* usb_typec_api_t::infoGet) (usb_typec_ctrl_t *const p_ctrl, usb_typec_info_t *const p_info) |
Get information on USB Type-C module.
| [in] | p_ctrl | Pointer to control structure. |
| [in] | p_info | Pointer to usb_typec_info_t structure area. |
| fsp_err_t(* usb_typec_api_t::lowPowerModeSet) (usb_typec_ctrl_t *const p_ctrl, usb_typec_ccs_status_t status) |
Set IRQ Mode for USB Type-C module by Software Standby
| [in] | p_ctrl | Pointer to control structure. |
| [in] | status | Status code of USBCC CCS Enable/Disable. |
| struct usb_typec_instance_t |
This structure encompasses everything that is needed to use an instance of this interface.
| Data Fields | ||
|---|---|---|
| usb_typec_ctrl_t * | p_ctrl | Pointer to the control structure for this instance. |
| usb_typec_cfg_t const * | p_cfg | Pointer to the configuration structure for this instance. |
| usb_typec_api_t const * | p_api | Pointer to the API structure for this instance. |
| typedef void usb_typec_ctrl_t |
USB Type-C control block. Allocate an instance specific control block to pass into the USB Type-C API calls.
| enum usb_typec_mode_t |
| enum usb_typec_pmode_t |
| enum usb_typec_plug_t |
USB TypeC Status of Connection State Machine
| enum usb_typec_status_t |
Status code of callback function