User API reference of the Communication Device Class (NCM). More...
Functions | |
int32_t | USBD_CDC_NCM_NTB_IN_Initialize (uint8_t instance) |
Clear the active NTB (prepared for sending) | |
int32_t | USBD_CDC_NCM_NTB_IN_CreateNDP (uint8_t instance, uint8_t num_datagrams) |
Create a new NDP in the NTB (datagrams can be added to it) | |
int32_t | USBD_CDC_NCM_NTB_IN_WriteDatagram (uint8_t instance, const uint8_t *buf, uint32_t len) |
Add a datagram into the active NDP of the NTB to be sent. | |
int32_t | USBD_CDC_NCM_NTB_IN_Send (uint8_t instance) |
Send the active NTB. | |
int32_t | USBD_CDC_NCM_NTB_IN_IsSent (uint8_t instance) |
Check if NTB was sent and new NTB can be prepared. | |
int32_t | USBD_CDC_NCM_NTB_OUT_IsReceived (uint8_t instance) |
Check if NTB was received and is available for processing. | |
int32_t | USBD_CDC_NCM_NTB_OUT_Release (uint8_t instance) |
Flush the received NTB and release memory for reception of a new NTB. | |
int32_t | USBD_CDC_NCM_NTB_OUT_ProcessNDP (uint8_t instance) |
Process the next NDP in the received NTB. | |
uint32_t | USBD_CDC_NCM_NTB_OUT_GetDatagramSize (uint8_t instance) |
Get size of a datagram from the active NDP of the received NTB. | |
int32_t | USBD_CDC_NCM_NTB_OUT_ReadDatagram (uint8_t instance, uint8_t *buf, uint32_t max_len) |
Read a datagram from the active NDP of the received NTB. | |
int32_t | USBD_CDC_NCM_NTB_IN_RawSend (uint8_t instance, const uint8_t *buf, uint32_t len) |
Send already prepared NTB (for this option value of define in configuration USBD_CDCn_NCM_RAW_ENABLE has to be 1) | |
uint32_t | USBD_CDC_NCM_NTB_OUT_RawGetSize (uint8_t instance) |
Get size of the received NTB. | |
int32_t | USBD_CDC_NCM_NTB_OUT_RawReceive (uint8_t instance, uint8_t *buf, uint32_t max_len) |
Receive an NDP (for this option value of define in configuration USBD_CDCn_NCM_RAW_ENABLE has to be 1) | |
int32_t | USBD_CDC_NCM_Notify_NetworkConnection (uint8_t instance, uint16_t status) |
Report whether or not the physical layer (modem, Ethernet PHY, etc.) link is up to the USB Host. | |
int32_t | USBD_CDC_NCM_Notify_ConnectionSpeedChange (uint8_t instance, uint32_t us_bitrate, uint32_t ds_bitrate) |
Report a change in upstream or downstream speed of the networking connection to the USB Host. | |
void | USBD_CDCn_NCM_Initialize (void) |
Callback function called during USBD_Initialize to initialize the USB CDC class instance (NCM) | |
void | USBD_CDCn_NCM_Uninitialize (void) |
Callback function called during USBD_Uninitialize to de-initialize the USB CDC class instance (NCM) | |
void | USBD_CDCn_NCM_Reset (void) |
Callback function called upon USB Bus Reset signaling. | |
void | USBD_CDCn_NCM_Start (void) |
Callback function called when USB Host changes data interface from alternate 0 to alternate 1 (activates data interface) | |
void | USBD_CDCn_NCM_Stop (void) |
Callback function called when USB Host changes data interface from alternate 1 to alternate 0 (de-activates data interface) | |
bool | USBD_CDCn_NCM_SetEthernetMulticastFilters (const uint8_t *addr_list, uint16_t num_of_filters) |
Callback function called upon USB Host request to set the Ethernet device multicast filters. | |
bool | USBD_CDCn_NCM_SetEthernetPowerManagementPatternFilter (uint16_t filter_number, const uint8_t *pattern_filter, uint16_t pattern_filter_size) |
Callback function called upon USB Host request to set up the specified Ethernet power management pattern filter. | |
bool | USBD_CDCn_NCM_GetEthernetPowerManagementPatternFilter (uint16_t filter_number, uint16_t *pattern_active) |
Callback function called upon USB Host request to retrieve the status of the specified Ethernet power management pattern filter. | |
bool | USBD_CDCn_NCM_SetEthernetPacketFilter (uint16_t packet_filter_bitmap) |
Callback function called upon USB Host request to configure device Ethernet packet filter settings. | |
bool | USBD_CDCn_NCM_GetEthernetStatistic (uint16_t feature_selector, uint32_t *data) |
Callback function called upon USB Host request to retrieve a statistic based on the feature selector. | |
bool | USBD_CDCn_NCM_GetNtbParameters (CDC_NCM_NTB_PARAM *ntb_params) |
Callback function called upon USB Host request to retrieve the parameters that describe NTBs for each direction. | |
bool | USBD_CDCn_NCM_GetNetAddress (uint8_t *net_addr) |
Callback function called upon USB Host request to return the USB Device's current EUI-48 station address. | |
bool | USBD_CDCn_NCM_SetNetAddress (const uint8_t *net_addr) |
Callback function called upon USB Host request to set the USB Device's current EUI-48 station address. | |
bool | USBD_CDCn_NCM_GetNtbFormat (uint16_t *ntb_format) |
Callback function called upon USB Host request to return the NTB data format currently being used. | |
bool | USBD_CDCn_NCM_SetNtbFormat (uint16_t ntb_format) |
Callback function called upon USB Host request to select the format of NTB to be used for NTBs transmitted to the USB Host. | |
bool | USBD_CDCn_NCM_GetNtbInputSize (uint32_t *ntb_input_size) |
Callback function called upon USB Host request to return NTB input size currently being used. | |
bool | USBD_CDCn_NCM_SetNtbInputSize (uint32_t ntb_input_size) |
Callback function called upon USB Host request to select the maximum size of NTB that is permitted to be sent to the USB Host. | |
bool | USBD_CDCn_NCM_GetMaxDatagramSize (uint16_t *max_datagram_size) |
Callback function called upon USB Host request to return the currently effective maximum datagram size. | |
bool | USBD_CDCn_NCM_SetMaxDatagramSize (uint16_t max_datagram_size) |
Callback function called upon USB Host request to select the maximum datagram size that can be sent in an NTB. | |
bool | USBD_CDCn_NCM_GetCrcMode (uint16_t *crc_mode) |
Callback function called upon USB Host request to return the currently selected CRC mode. | |
bool | USBD_CDCn_NCM_SetCrcMode (uint16_t crc_mode) |
Callback function called upon USB Host request to control CRC mode. | |
void | USBD_CDCn_NCM_NTB_IN_Sent (void) |
Callback function called when NTB was successfully sent. | |
void | USBD_CDCn_NCM_NTB_OUT_Received (void) |
Callback function called when NTB was successfully received. | |
User API reference of the Communication Device Class (NCM).
int32_t USBD_CDC_NCM_Notify_ConnectionSpeedChange | ( | uint8_t | instance, |
uint32_t | us_bitrate, | ||
uint32_t | ds_bitrate | ||
) |
Report a change in upstream or downstream speed of the networking connection to the USB Host.
[in] | instance | Instance of CDC class. |
[in] | us_bitrate | Upstream bitrate. |
[in] | ds_bitrate | Downstream bitrate. |
The function USBD_CDC_NCM_Notify_ConnectionSpeedChange report to the USB Host any change in the upstream or downstream speed of the networking connection.
The argument instance specifies the instance of the CDC class.
The argument us_bitrate specifies the upstream bitrate.
The argument ds_bitrate specifies the downstream bitrate.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_Notify_NetworkConnection | ( | uint8_t | instance, |
uint16_t | status | ||
) |
Report whether or not the physical layer (modem, Ethernet PHY, etc.) link is up to the USB Host.
[in] | instance | Instance of CDC class. |
[in] | status | Connection status :
|
The function USBD_CDC_NCM_Notify_NetworkConnection reports to the USB Host whether the physical layer (modem, Ethernet PHY, etc.) link is up.
The argument instance specifies the instance of the CDC class.
The argument status specifies the connection status.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_IN_CreateNDP | ( | uint8_t | instance, |
uint8_t | num_datagrams | ||
) |
Create a new NDP in the NTB (datagrams can be added to it)
[in] | instance | Instance of CDC class. |
[in] | num_datagrams | Maximum number of datagrams that NDP will contain. |
The function USBD_CDC_NCM_NTB_IN_CreateNDP creates a new NDP in the NTB so that datagrams can be added to it.
The argument instance specifies the instance of the CDC class.
The argument num_datagrams specifies the maximum number of datagrams that the NDP will contain.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_IN_Initialize | ( | uint8_t | instance | ) |
Clear the active NTB (prepared for sending)
[in] | instance | Instance of CDC class. |
The function USBD_CDC_NCM_NTB_IN_Initialize clears the active NTB and initializes it for adding of NDPs and datagrams.
The argument instance specifies the instance of the CDC class.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_IN_IsSent | ( | uint8_t | instance | ) |
Check if NTB was sent and new NTB can be prepared.
[in] | instance | Instance of CDC class. |
The function USBD_CDC_NCM_NTB_IN_IsSent checks whether the NTB was sent and a new one can be prepared.
The argument instance specifies the instance of the CDC class.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_IN_RawSend | ( | uint8_t | instance, |
const uint8_t * | buf, | ||
uint32_t | len | ||
) |
Send already prepared NTB (for this option value of define in configuration USBD_CDCn_NCM_RAW_ENABLE has to be 1)
[in] | instance | Instance of CDC class. |
[in] | buf | Buffer containing NTB. |
[in] | len | Size of NTB. |
The function USBD_CDC_NCM_NTB_IN_RawSend sends an already prepared NTB. For this option, the value of the #define
USBD_CDCn_NCM_RAW_ENABLE
in the configuration has to be '1'.
The argument instance specifies the instance of the CDC class.
The argument buf specifies the buffer containing the NTB.
The argument len specifies the size of the NTB.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_IN_Send | ( | uint8_t | instance | ) |
Send the active NTB.
[in] | instance | Instance of CDC class. |
The function USBD_CDC_NCM_NTB_IN_Send transmits the active NTB.
The argument instance specifies the instance of the CDC class.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_IN_WriteDatagram | ( | uint8_t | instance, |
const uint8_t * | buf, | ||
uint32_t | len | ||
) |
Add a datagram into the active NDP of the NTB to be sent.
[in] | instance | Instance of CDC class. |
[in] | buf | Buffer containing data bytes to write. |
[in] | len | Number of bytes to write. |
The function USBD_CDC_NCM_NTB_IN_WriteDatagram adds a datagram into the active NDP of the NTB to be sent.
The argument instance specifies the instance of the CDC class.
The argument buf is a buffer containing the data to be written.
The argument len specifies the number of bytes to be written.
Code Example
Refer to the CDC (NCM) User Code Template
uint32_t USBD_CDC_NCM_NTB_OUT_GetDatagramSize | ( | uint8_t | instance | ) |
Get size of a datagram from the active NDP of the received NTB.
[in] | instance | Instance of CDC class. |
The function USBD_CDC_NCM_NTB_OUT_GetDatagramSize returns the size of a datagram from the active NDP of the received NTB.
The argument instance specifies the instance of the CDC class.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_OUT_IsReceived | ( | uint8_t | instance | ) |
Check if NTB was received and is available for processing.
[in] | instance | Instance of CDC class. |
The function USBD_CDC_NCM_NTB_OUT_IsReceived checks whether the NTB was received and can be processed.
The argument instance specifies the instance of the CDC class.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_OUT_ProcessNDP | ( | uint8_t | instance | ) |
Process the next NDP in the received NTB.
[in] | instance | Instance of CDC class. |
The function USBD_CDC_NCM_NTB_OUT_ProcessNDP processes the next NDP in the received NTB.
The argument instance specifies the instance of the CDC class.
Code Example
Refer to the CDC (NCM) User Code Template
uint32_t USBD_CDC_NCM_NTB_OUT_RawGetSize | ( | uint8_t | instance | ) |
Get size of the received NTB.
[in] | instance | Instance of CDC class. |
The function USBD_CDC_NCM_NTB_OUT_RawGetSize returns the number of bytes available in the NTB.
The argument instance specifies the instance of the CDC class.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_OUT_RawReceive | ( | uint8_t | instance, |
uint8_t * | buf, | ||
uint32_t | max_len | ||
) |
Receive an NDP (for this option value of define in configuration USBD_CDCn_NCM_RAW_ENABLE has to be 1)
[in] | instance | Instance of CDC class. |
[out] | buf | Buffer that receives NTB. |
[in] | max_len | Maximum number of bytes that buffer can accept. |
The function USBD_CDC_NCM_NTB_OUT_RawReceive receives an NDP For this option, the value of the #define
USBD_CDCn_NCM_RAW_ENABLE
in the configuration has to be '1'.
The argument instance specifies the instance of the CDC class.
The argument buf specifies the buffer that receives the NTB.
The argument max_len specifies the maximum number of bytes that are accepted by the buffer (must be multiple of Bulk Out endpoint maximum packet size).
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_OUT_ReadDatagram | ( | uint8_t | instance, |
uint8_t * | buf, | ||
uint32_t | max_len | ||
) |
Read a datagram from the active NDP of the received NTB.
[in] | instance | Instance of CDC class. |
[out] | buf | Buffer that receives read data. |
[in] | max_len | Maximum number of bytes to read. |
The function USBD_CDC_NCM_NTB_OUT_ReadDatagram reads a datagram from the active NDP of the received NTB.
The argument instance specifies the instance of the CDC class.
The argument buf specifies the buffer that receives the data that is read.
The argument max_len specifies the maximum number of bytes to be read.
Code Example
Refer to the CDC (NCM) User Code Template
int32_t USBD_CDC_NCM_NTB_OUT_Release | ( | uint8_t | instance | ) |
Flush the received NTB and release memory for reception of a new NTB.
[in] | instance | Instance of CDC class. |
The function USBD_CDC_NCM_NTB_OUT_Release flushes the received NTB and releases the memory for the reception of a new NTB.
The argument instance specifies the instance of the CDC class.
Code Example
Refer to the CDC (NCM) User Code Template
bool USBD_CDCn_NCM_GetCrcMode | ( | uint16_t * | crc_mode | ) |
Callback function called upon USB Host request to return the currently selected CRC mode.
[out] | crc_mode | Pointer to current CRC mode. |
The function USBD_CDCn_NCM_GetCrcMode is called when the USB Host requests to return the currently selected CRC mode.
The argument crc_mode is a pointer to the current CRC mode.
Code Example
bool USBD_CDCn_NCM_GetEthernetPowerManagementPatternFilter | ( | uint16_t | filter_number, |
uint16_t * | pattern_active | ||
) |
Callback function called upon USB Host request to retrieve the status of the specified Ethernet power management pattern filter.
[in] | filter_number | Filter number. |
[out] | pattern_active | Pointer to pattern active boolean. |
The function USBD_CDCn_NCM_GetEthernetPowerManagementPatternFilter is called when the USB Host retrieves the status of the USB Device's Ethernet power management pattern filter.
The argument filter_number specifies the filter number.
The argument pattern_active is a pointer to the pattern active boolean.
Code Example
bool USBD_CDCn_NCM_GetEthernetStatistic | ( | uint16_t | feature_selector, |
uint32_t * | data | ||
) |
Callback function called upon USB Host request to retrieve a statistic based on the feature selector.
[in] | feature_selector | Feature Selector. |
[out] | data | Pointer to Statistics Value. |
The function USBD_CDCn_NCM_GetEthernetStatistic is called when the USB Host tries to retrieve an Ethernet statistic based on the feature selector.
The argument feature_selector specifies the feature selector.
The argument data is a pointer to the statistic's value.
Code Example
bool USBD_CDCn_NCM_GetMaxDatagramSize | ( | uint16_t * | max_datagram_size | ) |
Callback function called upon USB Host request to return the currently effective maximum datagram size.
[out] | max_datagram_size | Pointer to current maximum datagram size. |
The function USBD_CDCn_NCM_GetMaxDatagramSize is called when the USB Host requests to return the currently effective maximum datagram size used by the USB Device.
The argument max_datagram_size is a pointer to current maximum datagram size.
Code Example
bool USBD_CDCn_NCM_GetNetAddress | ( | uint8_t * | net_addr | ) |
Callback function called upon USB Host request to return the USB Device's current EUI-48 station address.
[out] | net_addr | Pointer to EUI-48 current address, in network byte order. |
The function USBD_CDCn_NCM_GetNetAddress is called when the USB Host requests to return the USB Device's current EUI-48 station address.
The argument net_addr is a pointer to the current EUI-48 network address.
Code Example
bool USBD_CDCn_NCM_GetNtbFormat | ( | uint16_t * | ntb_format | ) |
Callback function called upon USB Host request to return the NTB data format currently being used.
[out] | ntb_format | Pointer to NTB format code. |
The function USBD_CDCn_NCM_GetNtbFormat is called when the USB Host requests to return the NCM Transfer Block (NTBs) data format that is currently being used by the USB Device.
The argument ntb_format is a pointer to the NTB format code.
Code Example
bool USBD_CDCn_NCM_GetNtbInputSize | ( | uint32_t * | ntb_input_size | ) |
Callback function called upon USB Host request to return NTB input size currently being used.
[out] | ntb_input_size | Pointer to NTB input size. |
The function USBD_CDCn_NCM_GetNtbInputSize is called when the USB Host requests to return the NCM Transfer Block (NTBs) input size that is currently being used by the USB Device.
The argument ntb_input_size is a pointer to the NTB input size.
Code Example
bool USBD_CDCn_NCM_GetNtbParameters | ( | CDC_NCM_NTB_PARAM * | ntb_params | ) |
Callback function called upon USB Host request to retrieve the parameters that describe NTBs for each direction.
[out] | ntb_params | Pointer to NTB Parameter Structure. |
The function USBD_CDCn_NCM_GetNtbParameters is called when the USB Host requests to return the parameters that describe the NCM Transfer Blocks (NTBs) for each direction.
The argument ntb_params is a pointer to the NTB parameter structure.
Code Example
void USBD_CDCn_NCM_Initialize | ( | void | ) |
Callback function called during USBD_Initialize to initialize the USB CDC class instance (NCM)
The function USBD_CDCn_NCM_Initialize initializes the hardware resources of the network device. It is called during USBD_Initialize. The function may be used to allocate resources and initialize peripherals.
Modify this function to the application needs.
Code Example
void USBD_CDCn_NCM_NTB_IN_Sent | ( | void | ) |
Callback function called when NTB was successfully sent.
The function USBD_CDCn_NCM_NTB_IN_Sent is called when an NCM Transfer Block (NTBs) has been sent successfully.
Code Example
void USBD_CDCn_NCM_NTB_OUT_Received | ( | void | ) |
Callback function called when NTB was successfully received.
The function USBD_CDCn_NCM_NTB_OUT_Received is called when an NCM Transfer Block (NTBs) has been received successfully.
Code Example
void USBD_CDCn_NCM_Reset | ( | void | ) |
Callback function called upon USB Bus Reset signaling.
The function USBD_CDCn_NCM_Reset resets the network device.
Modify this function to the application's needs.
bool USBD_CDCn_NCM_SetCrcMode | ( | uint16_t | crc_mode | ) |
Callback function called upon USB Host request to control CRC mode.
[in] | crc_mode | CRC mode :
|
The function USBD_CDCn_NCM_SetCrcMode is called when the USB Host requests to set the CRC mode to be used for data transmissions.
The argument crc_mode is a value of the current CRC mode.
Code Example
bool USBD_CDCn_NCM_SetEthernetMulticastFilters | ( | const uint8_t * | addr_list, |
uint16_t | num_of_filters | ||
) |
Callback function called upon USB Host request to set the Ethernet device multicast filters.
[in] | addr_list | Pointer to list of 48-bit Multicast addresses. |
[in] | num_of_filters | Number of filters. |
The function USBD_CDCn_NCM_SetEthernetMulticastFilters is called when the USB Host requests to set the USB Device's Ethernet multicast filters.
The argument addr_list is a pointer to the list of 48-bit Multicast addresses.
The argument num_of_filters specifies the number of filters to be used.
Code Example
bool USBD_CDCn_NCM_SetEthernetPacketFilter | ( | uint16_t | packet_filter_bitmap | ) |
Callback function called upon USB Host request to configure device Ethernet packet filter settings.
[in] | packet_filter_bitmap | Packet Filter Bitmap. |
The function USBD_CDCn_NCM_SetEthernetPacketFilter is called when the USB Host requests to configure the USB Device's Ethernet packet filter settings.
The argument packet_filter_bitmap is the packet filter's bitmap.
Code Example
bool USBD_CDCn_NCM_SetEthernetPowerManagementPatternFilter | ( | uint16_t | filter_number, |
const uint8_t * | pattern_filter, | ||
uint16_t | pattern_filter_size | ||
) |
Callback function called upon USB Host request to set up the specified Ethernet power management pattern filter.
[in] | filter_number | Filter number. |
[in] | pattern_filter | Power management pattern filter structure. |
[in] | pattern_filter_size | Size of pattern filter structure. |
The function USBD_CDCn_NCM_SetEthernetPowerManagementPatternFilter is called when the USB Host requests to set up the USB Device's Ethernet power management pattern filter.
The argument filter_number specifies the filter number.
The argument pattern_filter is a pointer to the pattern filter structure.
The argument pattern_filter_size specifies the size of the pattern filter structure.
Code Example
bool USBD_CDCn_NCM_SetMaxDatagramSize | ( | uint16_t | max_datagram_size | ) |
Callback function called upon USB Host request to select the maximum datagram size that can be sent in an NTB.
[in] | max_datagram_size | Maximum datagram size. |
The function USBD_CDCn_NCM_SetMaxDatagramSize is called when the USB Host requests to set the maximum datagram size that can be sent in an NCM Transfer Block (NTBs).
The argument max_datagram_size is a pointer to current maximum datagram size.
Code Example
bool USBD_CDCn_NCM_SetNetAddress | ( | const uint8_t * | net_addr | ) |
Callback function called upon USB Host request to set the USB Device's current EUI-48 station address.
[in] | net_addr | Pointer to EUI-48 address, in network byte order. |
The function USBD_CDCn_NCM_SetNetAddress is called when the USB Host requests to set the USB Device's current EUI-48 station address.
The argument net_addr is a pointer to the EUI-48 network address.
Code Example
bool USBD_CDCn_NCM_SetNtbFormat | ( | uint16_t | ntb_format | ) |
Callback function called upon USB Host request to select the format of NTB to be used for NTBs transmitted to the USB Host.
[in] | ntb_format | NTB format selection :
|
The function USBD_CDCn_NCM_SetNtbFormat is called when the USB Host requests to set the NCM Transfer Block (NTBs) data format to be used by the USB Device for transfers to the host.
The argument ntb_format is a pointer to the NTB format code.
Code Example
bool USBD_CDCn_NCM_SetNtbInputSize | ( | uint32_t | ntb_input_size | ) |
Callback function called upon USB Host request to select the maximum size of NTB that is permitted to be sent to the USB Host.
[in] | ntb_input_size | Maximum NTB size. |
The function USBD_CDCn_NCM_SetNtbInputSize is called when the USB Host requests to set the maximum size of NCM Transfer Block (NTBs) that USB Device can send to the USB Host.
The argument ntb_input_size is a pointer to the NTB input size.
Code Example
void USBD_CDCn_NCM_Start | ( | void | ) |
Callback function called when USB Host changes data interface from alternate 0 to alternate 1 (activates data interface)
The function USBD_CDCn_NCM_Start is called when the USB Host activates the data interface.
Code Example
void USBD_CDCn_NCM_Stop | ( | void | ) |
Callback function called when USB Host changes data interface from alternate 1 to alternate 0 (de-activates data interface)
The function USBD_CDCn_NCM_Stop is called when the USB Host de-activates the data interface.
Code Example
void USBD_CDCn_NCM_Uninitialize | ( | void | ) |
Callback function called during USBD_Uninitialize to de-initialize the USB CDC class instance (NCM)
The function USBD_CDCn_NCM_Uninitialize de-initializes/releases the hardware resources of the network device. It is called during USBD_Uninitialize. If USBD_CDCn_NCM_Initialize has been adapted to the application, USBD_CDCn_NCM_Uninitialize should release resources and should de-initialize peripherals.
Code Example