Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
rl_usb.h File Reference
USB Device Library header. More...
Go to the source code of this file.
Functions | |
| int32_t | USBD_CDC_ACM_Initialize (void) |
| Initialization of the USB CDC class (ACM) | |
| int32_t | USBD_CDC_ACM_Reset (void) |
| Reset of the USB CDC class (ACM) variables and states. | |
| int32_t | USBD_CDC_ACM_PortInitialize (void) |
| Vitual COM Port initialization. | |
| int32_t | USBD_CDC_ACM_PortUninitialize (void) |
| Vitual COM Port uninitialization. | |
| int32_t | USBD_CDC_ACM_PortReset (void) |
| Vitual COM Port reset. | |
| int32_t | USBD_CDC_ACM_PortSetLineCoding (CDC_LINE_CODING *line_coding) |
| Virtual COM Port change communication settings. | |
| int32_t | USBD_CDC_ACM_PortGetLineCoding (CDC_LINE_CODING *line_coding) |
| Vitual COM Port retrieve communication settings. | |
| int32_t | USBD_CDC_ACM_PortSetControlLineState (uint16_t ctrl_bmp) |
| Virtual COM Port set control line state. | |
| int32_t | USBD_CDC_ACM_DataSend (const uint8_t *buf, int32_t len) |
| Sends data over the USB CDC ACM Virtual COM Port. | |
| int32_t | USBD_CDC_ACM_DataFree (void) |
| Number of free bytes in the Send buffer. | |
| int32_t | USBD_CDC_ACM_PutChar (const uint8_t ch) |
| Sends a single character over the USB CDC ACM Virtual COM Port. | |
| int32_t | USBD_CDC_ACM_DataRead (uint8_t *buf, int32_t len) |
| Reads data received over the USB CDC ACM Virtual COM Port. | |
| int32_t | USBD_CDC_ACM_GetChar (void) |
| Reads one character of data received over the USB CDC ACM Virtual COM Port. | |
| int32_t | USBD_CDC_ACM_DataAvailable (void) |
| Retrieves number of bytes received over the USB CDC ACM Virtual COM Port. | |
| int32_t | USBD_CDC_ACM_Notify (uint16_t stat) |
| Sends a notification of Virtual COM Port statuses and line states. | |
| int32_t | USBD_CDC_ACM_SetLineCoding (void) |
| Sets Line Coding for the USB CDC ACM Virtual COM Port. | |
| int32_t | USBD_CDC_ACM_GetLineCoding (void) |
| Gets Line Coding from the USB CDC ACM Virtual COM Port. | |
| int32_t | USBD_CDC_ACM_SetControlLineState (uint16_t ctrl_bmp) |
| Sets Control Line State for the USB CDC ACM Virtual COM Port. | |
Detailed Description
USB Device Library header.
DAPLink Interface Firmware Copyright (c) 2009-2016, ARM Limited, All Rights Reserved SPDX-License-Identifier: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file rl_usb.h.
Function Documentation
| int32_t USBD_CDC_ACM_DataAvailable | ( | void | ) |
Retrieves number of bytes received over the USB CDC ACM Virtual COM Port.
The function retrieves number of bytes available in the intermediate buffer that were received over the Virtual COM Port.
- Returns:
- Number of bytes available for read.
Definition at line 427 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_DataFree | ( | void | ) |
Number of free bytes in the Send buffer.
Definition at line 287 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_DataRead | ( | uint8_t * | buf, |
| int32_t | len | ||
| ) |
Reads data received over the USB CDC ACM Virtual COM Port.
The function reads data from the receive intermediate buffer that was received over the Virtual COM Port.
- Parameters:
-
[in] buf Buffer to where data will be read. [in] len Maximum number of bytes to be read.
- Returns:
- Number of bytes actually read.
Definition at line 377 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_DataSend | ( | const uint8_t * | buf, |
| int32_t | len | ||
| ) |
Sends data over the USB CDC ACM Virtual COM Port.
The function puts requested data to the send intermediate buffer and prepares it for sending over the Virtual COM Port.
- Parameters:
-
[in] buf Buffer containing data to be sent. [in] len Maximum number of bytes to be sent.
- Returns:
- Number of bytes accepted to be sent.
Definition at line 302 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_GetChar | ( | void | ) |
Reads one character of data received over the USB CDC ACM Virtual COM Port.
The function reads data character from the receive intermediate buffer that was received over the Virtual COM Port.
- Returns:
- -1 No character available.
- Received character.
Definition at line 407 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_GetLineCoding | ( | void | ) |
Gets Line Coding from the USB CDC ACM Virtual COM Port.
The function is a callback function that forwards USB CDC ACM request to get communication settings from the Virtual COM Port.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 247 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_Initialize | ( | void | ) |
Initialization of the USB CDC class (ACM)
The function calls USBD_CDC_ACM_PortInitialize function which initializes Virtual COM Port.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 140 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_Notify | ( | uint16_t | stat ) |
Sends a notification of Virtual COM Port statuses and line states.
The function sends error and line status of the Virtual COM Port over the Interrupt endpoint. (SerialState notification is defined in usbcdc11.pdf, 6.3.5.)
- Parameters:
-
[in] stat Error and line statuses ( 6. bit - bOverRun, 5. bit - bParity, 4. bit - bFraming, 3. bit - bRingSignal, 2. bit - bBreak, 1. bit - bTxCarrier (DSR line state), 0. bit - bRxCarrier (DCD line status)).
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 450 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_PortGetLineCoding | ( | CDC_LINE_CODING * | line_coding ) |
Vitual COM Port retrieve communication settings.
The function retrieves communication settings of the port used as the Virtual COM Port.
- Parameters:
-
[in] line_coding Pointer to the CDC_LINE_CODING structure.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 104 of file usbd_user_cdc_acm.c.
| int32_t USBD_CDC_ACM_PortInitialize | ( | void | ) |
Vitual COM Port initialization.
The function inititalizes the hardware resources of the port used as the Virtual COM Port.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 41 of file usbd_user_cdc_acm.c.
| int32_t USBD_CDC_ACM_PortReset | ( | void | ) |
Vitual COM Port reset.
The function resets the internal states of the port used as the Virtual COM Port.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 70 of file usbd_user_cdc_acm.c.
| int32_t USBD_CDC_ACM_PortSetControlLineState | ( | uint16_t | ctrl_bmp ) |
Virtual COM Port set control line state.
The function sets control line state on the port used as the Virtual COM Port.
- Parameters:
-
[in] ctrl_bmp Control line settings bitmap (0. bit - DTR state, 1. bit - RTS state).
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 149 of file usbd_user_cdc_acm.c.
| int32_t USBD_CDC_ACM_PortSetLineCoding | ( | CDC_LINE_CODING * | line_coding ) |
Virtual COM Port change communication settings.
The function changes communication settings of the port used as the Virtual COM Port.
- Parameters:
-
[in] line_coding Pointer to the loaded CDC_LINE_CODING structure.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 85 of file usbd_user_cdc_acm.c.
| int32_t USBD_CDC_ACM_PortUninitialize | ( | void | ) |
Vitual COM Port uninitialization.
The function uninititalizes/releases the hardware resources of the port used as the Virtual COM Port.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 56 of file usbd_user_cdc_acm.c.
| int32_t USBD_CDC_ACM_PutChar | ( | const uint8_t | ch ) |
Sends a single character over the USB CDC ACM Virtual COM Port.
The function puts requested data character to the send intermediate buffer and prepares it for sending over the Virtual COM Port.
- Parameters:
-
[in] ch Character to be sent.
- Returns:
- -1 Function failed.
- Character accepted to be sent.
Definition at line 357 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_Reset | ( | void | ) |
Reset of the USB CDC class (ACM) variables and states.
The function resets class variables and states, it calls USBD_CDC_ACM_PortReset function which resets Virtual COM Port variables and states and calls USBD_CDC_ACM_PortSetLineCoding function with default parameters to set default communication settings for the Virtual COM Port.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 191 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_SetControlLineState | ( | uint16_t | ctrl_bmp ) |
Sets Control Line State for the USB CDC ACM Virtual COM Port.
The function is a callback function that forwards USB CDC ACM request to set desired control line state to the Virtual COM Port.
- Parameters:
-
[in] ctrl_bmp Control line settings bitmap ( 0. bit - DTR state, 1. bit - RTS state).
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 276 of file usbd_cdc_acm.c.
| int32_t USBD_CDC_ACM_SetLineCoding | ( | void | ) |
Sets Line Coding for the USB CDC ACM Virtual COM Port.
The function is a callback function that forwards USB CDC ACM request to set communication settings to the Virtual COM Port.
- Returns:
- 0 Function failed.
- 1 Function succeeded.
Definition at line 43 of file realtek/rtl8195am/target.c.
Generated on Tue Jul 12 2022 15:37:30 by
1.7.2