RA Flexible Software Package Documentation
Release v5.6.0
|
|
Functions | |
fsp_err_t | R_USB_EventGet (usb_ctrl_t *const p_api_ctrl, usb_status_t *event) |
Obtains completed USB related events. (OS-less Only) More... | |
fsp_err_t | R_USB_Callback (usb_callback_t *p_callback) |
Register a callback function to be called upon completion of a USB related event. (RTOS only) More... | |
fsp_err_t | R_USB_Open (usb_ctrl_t *const p_api_ctrl, usb_cfg_t const *const p_cfg) |
Applies power to the USB module specified in the argument (p_ctrl). More... | |
fsp_err_t | R_USB_Close (usb_ctrl_t *const p_api_ctrl) |
Terminates power to the USB module specified in argument (p_ctrl). USB0 module stops when USB_IP0 is specified to the member (module), USB1 module stops when USB_IP1 is specified to the member (module). More... | |
fsp_err_t | R_USB_Read (usb_ctrl_t *const p_api_ctrl, uint8_t *p_buf, uint32_t size, uint8_t destination) |
Bulk/Interrupt data transfer. More... | |
fsp_err_t | R_USB_Write (usb_ctrl_t *const p_api_ctrl, uint8_t const *const p_buf, uint32_t size, uint8_t destination) |
Bulk/Interrupt data transfer. More... | |
fsp_err_t | R_USB_Stop (usb_ctrl_t *const p_api_ctrl, usb_transfer_t direction, uint8_t destination) |
Requests a data read/write transfer be terminated when a data read/write transfer is being performed. More... | |
fsp_err_t | R_USB_Suspend (usb_ctrl_t *const p_api_ctrl) |
Sends a SUSPEND signal from the USB module assigned to the member (module) of the usb_crtl_t structure. More... | |
fsp_err_t | R_USB_Resume (usb_ctrl_t *const p_api_ctrl) |
Sends a RESUME signal from the USB module assigned to the member (module) of the usb_ctrl_tstructure. More... | |
fsp_err_t | R_USB_VbusSet (usb_ctrl_t *const p_api_ctrl, uint16_t state) |
Specifies starting or stopping the VBUS supply. More... | |
fsp_err_t | R_USB_InfoGet (usb_ctrl_t *const p_api_ctrl, usb_info_t *p_info, uint8_t destination) |
Obtains completed USB-related events. More... | |
fsp_err_t | R_USB_PipeRead (usb_ctrl_t *const p_api_ctrl, uint8_t *p_buf, uint32_t size, uint8_t pipe_number) |
Requests a data read (Bulk/Interrupt transfer) via the pipe specified in the argument. More... | |
fsp_err_t | R_USB_PipeWrite (usb_ctrl_t *const p_api_ctrl, uint8_t *p_buf, uint32_t size, uint8_t pipe_number) |
Requests a data write (Bulk/Interrupt transfer). More... | |
fsp_err_t | R_USB_PipeStop (usb_ctrl_t *const p_api_ctrl, uint8_t pipe_number) |
Terminates a data read/write operation. More... | |
fsp_err_t | R_USB_UsedPipesGet (usb_ctrl_t *const p_api_ctrl, uint16_t *p_pipe, uint8_t destination) |
Gets the selected pipe number (number of the pipe that has completed initalization) via bit map information. More... | |
fsp_err_t | R_USB_PipeInfoGet (usb_ctrl_t *const p_api_ctrl, usb_pipe_t *p_info, uint8_t pipe_number) |
Gets the following pipe information regarding the pipe specified in the argument (p_ctrl) member (pipe): endpoint number, transfer type, transfer direction and maximum packet size. More... | |
fsp_err_t | R_USB_PullUp (usb_ctrl_t *const p_api_ctrl, uint8_t state) |
This API enables or disables pull-up of D+/D- line. More... | |
fsp_err_t | R_USB_HostControlTransfer (usb_ctrl_t *const p_api_ctrl, usb_setup_t *p_setup, uint8_t *p_buf, uint8_t device_address) |
Performs settings and transmission processing when transmitting a setup packet. More... | |
fsp_err_t | R_USB_PeriControlDataGet (usb_ctrl_t *const p_api_ctrl, uint8_t *p_buf, uint32_t size) |
Receives data sent by control transfer. More... | |
fsp_err_t | R_USB_PeriControlDataSet (usb_ctrl_t *const p_api_ctrl, uint8_t *p_buf, uint32_t size) |
Performs transfer processing for control transfer. More... | |
fsp_err_t | R_USB_PeriControlStatusSet (usb_ctrl_t *const p_api_ctrl, usb_setup_status_t status) |
Set the response to the setup packet. More... | |
fsp_err_t | R_USB_RemoteWakeup (usb_ctrl_t *const p_api_ctrl) |
Sends a remote wake-up signal to the connected Host. More... | |
fsp_err_t | R_USB_DriverActivate (usb_ctrl_t *const p_api_ctrl) |
Activate USB Driver for USB Peripheral BareMetal. More... | |
fsp_err_t | R_USB_CallbackMemorySet (usb_ctrl_t *const p_api_ctrl, usb_callback_args_t *p_callback_memory) |
Set callback memory to USB Driver for USB Peripheral BareMetal. More... | |
fsp_err_t | R_USB_ModuleNumberGet (usb_ctrl_t *const p_api_ctrl, uint8_t *module_number) |
This API gets the module number. More... | |
fsp_err_t | R_USB_ClassTypeGet (usb_ctrl_t *const p_api_ctrl, usb_class_t *class_type) |
This API gets the class type. More... | |
fsp_err_t | R_USB_DeviceAddressGet (usb_ctrl_t *const p_api_ctrl, uint8_t *device_address) |
This API gets the device address. More... | |
fsp_err_t | R_USB_PipeNumberGet (usb_ctrl_t *const p_api_ctrl, uint8_t *pipe_number) |
This API gets the pipe number. More... | |
fsp_err_t | R_USB_DeviceStateGet (usb_ctrl_t *const p_api_ctrl, uint16_t *state) |
This API gets the state of the device. More... | |
fsp_err_t | R_USB_DataSizeGet (usb_ctrl_t *const p_api_ctrl, uint32_t *data_size) |
This API gets the read data size. More... | |
fsp_err_t | R_USB_SetupGet (usb_ctrl_t *const p_api_ctrl, usb_setup_t *setup) |
This API gets the setup information. More... | |
fsp_err_t | R_USB_OtgCallbackSet (usb_ctrl_t *const p_api_ctrl, usb_otg_callback_t *p_callback) |
Set callback function to be called when the OTG role swap was completed on Azure RTOS. More... | |
fsp_err_t | R_USB_OtgSRP (usb_ctrl_t *const p_api_ctrl) |
Start the SRP processing for OTG on Azure RTOS. More... | |
fsp_err_t | R_USB_TypeCInfoGet (usb_ctrl_t *const p_api_ctrl, usb_typec_info_t *p_info) |
USB Type-C connect Information get. More... | |
Driver for the USB peripheral on RA MCUs. This module implements the USB Interface.
The USB module operates in combination with the device class drivers provided by Renesas to form a complete USB stack.
The USB module has the following key features:
This driver supports the following device classes.
Host/Peripheral | Device Class | BareMetal | FreeRTOS | AzureRTOS |
---|---|---|---|---|
Host | HCDC (ACM) | Yes | Yes | Yes |
HCDC (ECM) | – | Yes | – | |
HHID | Yes | Yes | Yes | |
HMSC | Yes | Yes | Yes | |
HPRN | – | – | Yes | |
HUVC | – | – | Yes | |
HVND | Yes | Yes | – | |
HCDC+HMSC (Composite) | – | Yes | – | |
Peripheral | PCDC | Yes | Yes | Yes |
PHID | Yes | Yes | Yes | |
PMSC | Yes | Yes | Yes | |
PPRN | Yes | Yes | Yes | |
PAUD | – | – | Yes | |
DFU | – | – | Yes | |
PVND | Yes | Yes | – | |
PCDC+PMSC | Yes | Yes | Yes | |
PHID+PMSC | Yes | Yes | – | |
PCDC+PHID | Yes | Yes | – | |
PCDC+PCDC | Yes | Yes | – | |
PHID+PHID | Yes | Yes | – | |
PCDC+PVND | Yes | Yes | – | |
Other | OTG (CDC) | – | – | Yes |
OTG (HID) | – | – | Yes | |
OTG (MSC) | – | – | Yes |
Configuration | Options | Default | Description |
---|---|---|---|
Parameter Checking |
| Default (BSP) | If selected code for parameter checking is included in the build. |
PLL Frequency | MCU Specific Options | Specify the PLL frequency supplied to the USB module. This setting only applies to USB1 (not USB0). | |
CPU Bus Access Wait Cycles | MCU Specific Options | This setting controls the delay for consecutive USB peripheral register access. Set this value to a number of CPU cycles that is equivalent to 40.8ns or more. | |
Battery Charging | MCU Specific Options | Specify whether or not to include battery charging functionality. | |
Power IC Shutdown Polarity | MCU Specific Options | Select the polarity of the Shutdown signal on the power supply IC (if provided). | |
Dedicated Charging Port (DCP) Mode | MCU Specific Options | When enabled, USB communication is disabled and the port is used for charging only. | |
Notifications for SET_INTERFACE/SET_FEATURE/CLEAR_FEATURE |
| Enabled | When enabled, the application will receive notifications for SET_INTERFACE, SET_FEATURE and CLEAR_FEATURE messages. |
Double Buffering |
| Enabled | When enabled, the FIFOs for Pipes 1-5 are double-buffered. |
Continuous Transfer Mode | MCU Specific Options | Enable or disable continuous transfer mode. | |
LDO Regulator | MCU Specific Options | Enable or disable LDO regulator. | |
Type-C | MCU Specific Options | Enable or disable Type-C. | |
DMA Support | MCU Specific Options | Enable or disable DMA support for the USB module. | |
DMA Source Address | MCU Specific Options | Set this to match the speed mode when DMA is enabled. Otherwise, set to 'DMA Disabled'. | |
DMA Destination Address | MCU Specific Options | Set this to match the speed mode when DMA is enabled. Otherwise, set to 'DMA Disabled'. | |
USB Compliance Test mode |
| Disabled | Display the information required to take the compliance test. |
USB TPL table name | Enter the TPL table name. | NULL | Enter the name of the TPL Table. |
Configuration | Options | Default | Description |
---|---|---|---|
Name | Name must be a valid C symbol | g_basic0 | Module name. |
USB Mode |
| Host mode | Select the usb mode. |
USB Speed |
| Full Speed | Select the USB speed. |
USB Module Number |
| USB_IP0 Port | Specify the USB module number to be used. |
USB Device Class | Refer to the RA Configuration tool for available options. | Peripheral Communications Device Class | Select the USB device class. |
USB Descriptor | USB Descriptor must be a valid C symbol. | g_usb_descriptor | Enter the name of the descriptor to be used. For how to create a descriptor structure, refer to the Descriptor definition chapter in the usb_basic manual. Specify NULL when using the Host class. |
USB Compliance Callback | Compliance Callback must be a valid C symbol. | NULL | Set the callback for compliance tests here. |
USBFS Interrupt Priority | MCU Specific Options | Select the interrupt priority used by the main USBFS ISR. | |
USBFS Resume Priority | MCU Specific Options | Select the interrupt priority used by the USBFS Resume ISR. | |
USBFS D0FIFO Interrupt Priority | MCU Specific Options | Select the interrupt priority used by the USBFS D0FIFO. | |
USBFS D1FIFO Interrupt Priority | MCU Specific Options | Select the interrupt priority used by the USBFS D1FIFO. | |
USBHS Interrupt Priority | MCU Specific Options | Select the interrupt priority used by the main USBHS ISR. | |
USBHS D0FIFO Interrupt Priority | MCU Specific Options | Select the interrupt priority used by the USBHS D0FIFO ISR. | |
USBHS D1FIFO Interrupt Priority | MCU Specific Options | Select the interrupt priority used by the USBHS D1FIFO ISR. | |
USB Callback | Enter the address of the function. | NULL | A user callback function can be defined here. |
USB Callback Context | Enter the address of the context. | NULL | Set the callback context here. |
The USB module uses PLL as the clock source. The PLL frequency can be set in the Clocks tab of the configuration editor or by using the CGC Interface at run-time.
In peripheral mode the USB_VBUS and/or USBHS_VBUS pins are used to detect the USB connection status (connected or disconnected) and should be connected to the USB VBUS signal.
In host mode the USBHS_VBUSEN, USBHS_OVRCURA and USBHS_OVRCURB pins should be connected to the relevant pins of an external power supply IC, if available. These pins will be used to manage the USB VBUS supply.
When using DMA with USB the following properties must be configured for each DMAC module:
Config Name | Select Name | Description |
---|---|---|
Transfer Size | 2 Bytes 4 Bytes | In FS mode, select "2 Bytes" In HS mode, select "4 Bytes" |
Activation source | USBFS FIFO 0 USBFS FIFO 1 USBHS FIFO 0 USBHS FIFO 1 | USB FS Reception USB FS Transmission USB HS Reception USB HS Transmission |
In Peripheral mode, the usb_descriptor_t structure stores descriptor information including the device and configuration descriptors. The values set in this structure are sent to the USB host as part of enumeration.
This USB driver requires string descriptors to be registered in the string descriptor table. Use the following format to define the elements:
Refer to the Universal Serial Bus Revision 2.0 specification (http://www.usb.org/developers/docs/) for details on how to construct the device, configuration and qualifier descriptors.
USB applications (whether using an RTOS or not) should be written as an event-handling loop. Either a callback function (RTOS only) or R_USB_EventGet should be used to provide event data to the application loop where a switch statement handles the event.
Developers should be aware of the following limitations when using the USB driver:
Please set as follows to the following items in RA configuration (r_usb_basic) when doing the compliance test.
1.USB Compliance Test mode Set "Enabled" in this item.
2.USB TPL table name. Set the start address of TPL(Target Peripheral List) defined in the application program.
Please refer to the following about how to define for TPL.
The following example is when two devices are set in TPL.
3.USB Compliance Callback Set the start address of the callback function defined in the application program.
The user needs to create this callback function by referring to the following.
Please replace the display function described in the example with the display function created by the customer.
The user can get completed USB event using callback function in USB Peripheral for BareMetal.
Please specify user callback function in the following item.
This driver for FreeRTOS supports the following compoiste device when this driver for FreeRTOS works in USB Host mode.
Enable UCLK in "Clocks" tab on e² studio when using the following MCU.
This is a basic example of minimal use of the USB in an application.
This is Host composiete (CDC+MSC) example of minimal use of the USB in an application.
Typedefs | |
typedef usb_event_info_t | usb_instance_ctrl_t |
typedef usb_event_info_t usb_instance_ctrl_t |
USB private control block. DO NOT MODIFY. Initialization occurs when R_USB_Open is called.
fsp_err_t R_USB_EventGet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_status_t * | event | ||
) |
Obtains completed USB related events. (OS-less Only)
In USB host mode, the device address value of the USB device that completed an event is specified in the usb_ctrl_t structure member (address) specified by the event's argument. In USB peripheral mode, USB_NULL is specified in member (address). If this function is called in the RTOS execution environment, a failure is returned.
FSP_SUCCESS | Event Get Success. |
FSP_ERR_USB_FAILED | If called in the RTOS environment, an error is returned. |
fsp_err_t R_USB_Callback | ( | usb_callback_t * | p_callback | ) |
Register a callback function to be called upon completion of a USB related event. (RTOS only)
This function registers a callback function to be called when a USB-related event has completed. If this function is called in the OS-less execution environment, a failure is returned.
FSP_SUCCESS | Successfully completed. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
fsp_err_t R_USB_Open | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_cfg_t const *const | p_cfg | ||
) |
Applies power to the USB module specified in the argument (p_ctrl).
FSP_SUCCESS | Success in open. |
FSP_ERR_USB_BUSY | Specified USB module now in use. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_Close | ( | usb_ctrl_t *const | p_api_ctrl | ) |
Terminates power to the USB module specified in argument (p_ctrl). USB0 module stops when USB_IP0 is specified to the member (module), USB1 module stops when USB_IP1 is specified to the member (module).
FSP_SUCCESS | Success. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_USB_NOT_OPEN | USB module is not open. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_Read | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t * | p_buf, | ||
uint32_t | size, | ||
uint8_t | destination | ||
) |
Bulk/Interrupt data transfer.
Requests USB data read (bulk/interrupt transfer). The read data is stored in the area specified by argument (p_buf). After data read is completed, confirm the operation by checking the return value (USB_STATUS_READ_COMPLETE) of the R_USB_GetEvent function. The received data size is set in member (size) of the usb_ctrl_t structure. To figure out the size of the data when a read is complete, check the return value (USB_STATUS_READ_COMPLETE) of the R_USB_GetEvent function, and then refer to the member (size) of the usb_crtl_t structure.
FSP_SUCCESS | Successfully completed (Data read request completed). |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_USB_BUSY | Data receive request already in process for USB device with same device address. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_Write | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t const *const | p_buf, | ||
uint32_t | size, | ||
uint8_t | destination | ||
) |
Bulk/Interrupt data transfer.
Requests USB data write (bulk/interrupt transfer). Stores write data in area specified by argument (p_buf). Set the device class type in usb_ctrl_t structure member (type). Confirm after data write is completed by checking the return value (USB_STATUS_WRITE_COMPLETE) of the R_USB_GetEvent function. For sending a zero-length packet, please refer the following Note.
FSP_SUCCESS | Successfully completed. (Data write request completed) |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_USB_BUSY | Data write request already in process for USB device with same device address. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_Stop | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_transfer_t | direction, | ||
uint8_t | destination | ||
) |
Requests a data read/write transfer be terminated when a data read/write transfer is being performed.
To stop a data read, set USB_TRANSFER_READ as the argument (type); to stop a data write, specify USB_WRITE as the argument (type).
FSP_SUCCESS | Successfully completed. (stop completed) |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_BUSY | Stop processing is called multiple times. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_Suspend | ( | usb_ctrl_t *const | p_api_ctrl | ) |
Sends a SUSPEND signal from the USB module assigned to the member (module) of the usb_crtl_t structure.
After the suspend request is completed, confirm the operation with the return value (USB_STATUS_SUSPEND) of the R_USB_EventGet function.
FSP_SUCCESS | Successfully completed. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_USB_BUSY | During a suspend request to the specified USB module, or when the USB module is already in the suspended state. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_Resume | ( | usb_ctrl_t *const | p_api_ctrl | ) |
Sends a RESUME signal from the USB module assigned to the member (module) of the usb_ctrl_tstructure.
After the resume request is completed, confirm the operation with the return value (USB_STATUS_RESUME) of the R_USB_EventGet function
FSP_SUCCESS | Successfully completed. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_USB_BUSY | Resume already requested for same device address. (USB host mode only) |
FSP_ERR_USB_NOT_SUSPEND | USB device is not in the SUSPEND state. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_VbusSet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint16_t | state | ||
) |
Specifies starting or stopping the VBUS supply.
FSP_SUCCESS | Successful completion. (VBUS supply start/stop completed) |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_InfoGet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_info_t * | p_info, | ||
uint8_t | destination | ||
) |
Obtains completed USB-related events.
FSP_SUCCESS | Successful completion. (VBUS supply start/stop completed) |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_PipeRead | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t * | p_buf, | ||
uint32_t | size, | ||
uint8_t | pipe_number | ||
) |
Requests a data read (Bulk/Interrupt transfer) via the pipe specified in the argument.
The read data is stored in the area specified in the argument (p_buf). After the data read is completed, confirm the operation with the R_USB_GetEvent function return value(USB_STATUS_READ_COMPLETE). To figure out the size of the data when a read is complete, check the return value (USB_STATUS_READ_COMPLETE) of the R_USB_GetEvent function, and then refer to the member (size) of the usb_crtl_t structure.
FSP_SUCCESS | Successfully completed. |
FSP_ERR_USB_BUSY | Specified pipe now handling data receive/send request. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_PipeWrite | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t * | p_buf, | ||
uint32_t | size, | ||
uint8_t | pipe_number | ||
) |
Requests a data write (Bulk/Interrupt transfer).
The write data is stored in the area specified in the argument (p_buf). After data write is completed, confirm the operation with the return value (USB_STATUS_WRITE_COMPLETE) of the EventGet function. For sending a zero-length packet, please refer the following Note.
FSP_SUCCESS | Successfully completed. |
FSP_ERR_USB_BUSY | Specified pipe now handling data receive/send request. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_PipeStop | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t | pipe_number | ||
) |
Terminates a data read/write operation.
FSP_SUCCESS | Successfully completed. (Stop request completed) |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_UsedPipesGet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint16_t * | p_pipe, | ||
uint8_t | destination | ||
) |
Gets the selected pipe number (number of the pipe that has completed initalization) via bit map information.
The bit map information is stored in the area specified in argument (p_pipe). Based on the information (module member and address member) assigned to the usb_ctrl_t structure, obtains the PIPE information of that USB device.
FSP_SUCCESS | Successfully completed. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_PipeInfoGet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_pipe_t * | p_info, | ||
uint8_t | pipe_number | ||
) |
Gets the following pipe information regarding the pipe specified in the argument (p_ctrl) member (pipe): endpoint number, transfer type, transfer direction and maximum packet size.
The obtained pipe information is stored in the area specified in the argument (p_info).
FSP_SUCCESS | Successfully completed. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_PullUp | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t | state | ||
) |
This API enables or disables pull-up of D+/D- line.
FSP_SUCCESS | Successful completion. (Pull-up enable/disable setting completed) |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_HostControlTransfer | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_setup_t * | p_setup, | ||
uint8_t * | p_buf, | ||
uint8_t | device_address | ||
) |
Performs settings and transmission processing when transmitting a setup packet.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
FSP_ERR_USB_BUSY | Specified pipe now handling data receive/send request. |
fsp_err_t R_USB_PeriControlDataGet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t * | p_buf, | ||
uint32_t | size | ||
) |
Receives data sent by control transfer.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_BUSY | Specified pipe now handling data receive/send request. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_PeriControlDataSet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t * | p_buf, | ||
uint32_t | size | ||
) |
Performs transfer processing for control transfer.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_BUSY | Specified pipe now handling data receive/send request. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_PeriControlStatusSet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_setup_status_t | status | ||
) |
Set the response to the setup packet.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_PARAMETER | Parameter error. |
fsp_err_t R_USB_RemoteWakeup | ( | usb_ctrl_t *const | p_api_ctrl | ) |
Sends a remote wake-up signal to the connected Host.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
FSP_ERR_USB_NOT_SUSPEND | Device is not suspended. |
FSP_ERR_USB_BUSY | The device is in resume operation. |
fsp_err_t R_USB_DriverActivate | ( | usb_ctrl_t *const | p_api_ctrl | ) |
Activate USB Driver for USB Peripheral BareMetal.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
fsp_err_t R_USB_CallbackMemorySet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_callback_args_t * | p_callback_memory | ||
) |
Set callback memory to USB Driver for USB Peripheral BareMetal.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
fsp_err_t R_USB_ModuleNumberGet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t * | module_number | ||
) |
This API gets the module number.
FSP_SUCCESS | Successful completion. |
fsp_err_t R_USB_ClassTypeGet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_class_t * | class_type | ||
) |
This API gets the class type.
FSP_SUCCESS | Successful completion. |
fsp_err_t R_USB_DeviceAddressGet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t * | device_address | ||
) |
This API gets the device address.
FSP_SUCCESS | Successful completion. |
fsp_err_t R_USB_PipeNumberGet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint8_t * | pipe_number | ||
) |
This API gets the pipe number.
FSP_SUCCESS | Successful completion. |
fsp_err_t R_USB_DeviceStateGet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint16_t * | state | ||
) |
This API gets the state of the device.
FSP_SUCCESS | Successful completion. |
fsp_err_t R_USB_DataSizeGet | ( | usb_ctrl_t *const | p_api_ctrl, |
uint32_t * | data_size | ||
) |
This API gets the read data size.
FSP_SUCCESS | Successful completion. |
fsp_err_t R_USB_SetupGet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_setup_t * | setup | ||
) |
This API gets the setup information.
FSP_SUCCESS | Successful completion. |
fsp_err_t R_USB_OtgCallbackSet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_otg_callback_t * | p_callback | ||
) |
Set callback function to be called when the OTG role swap was completed on Azure RTOS.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
fsp_err_t R_USB_OtgSRP | ( | usb_ctrl_t *const | p_api_ctrl | ) |
Start the SRP processing for OTG on Azure RTOS.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |
FSP_ERR_ASSERTION | Parameter is NULL error. |
fsp_err_t R_USB_TypeCInfoGet | ( | usb_ctrl_t *const | p_api_ctrl, |
usb_typec_info_t * | p_info | ||
) |
USB Type-C connect Information get.
FSP_SUCCESS | Successful completion. |
FSP_ERR_USB_FAILED | The function could not be completed successfully. |