# Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

### Protego

# MLA -- USB Library

20 December, 2013

- 1
- 2
…
- 72
- 73
- 74
- 75
- 76
…
- 311
- 312

mUSBUSARTTxRom Use this macro to transfer data located in program memory. Use this
macro when:
1. Data stream is not null-terminated
2. Transfer length is known
Remember: cdc_trf_state must == CDC_TX_READY Unlike
putrsUSBUSART, there is not code double checking the transfer state.
Unexpected behavior will occur if this function is called when
cdc_trf_state != CDC_TX_READY
Typical Usage:
USBUSARTIsTxTrfReady This macro is used to check if the CDC class is ready to send more data.
Module
CDC Function Driver
Description
Functions and macro functions used to interface with the CDC module.
1.4.1.3.2.1 CDCInitEP Function
This function initializes the CDC function driver. This function should be called after the SET_CONFIGURATION command
(ex: within the context of the USBCBInitEP() function).
File
usb_device_cdc.h
Syntax
void CDCInitEP();
Description
This function initializes the CDC function driver. This function sets the default line coding (baud rate, bit parity, number of
data bits, and format). This function also enables the endpoints and prepares for the first transfer from the host.
This function should be called after the SET_CONFIGURATION command. This is most simply done by calling this function
from the USBCBInitEP() function.
Typical Usage:
void USBCBInitEP(void)
{
CDCInitEP();
}
Remarks
None
Preconditions
None
Function
void CDCInitEP(void)
1.4.1.3.2.2 CDCNotificationHandler Function
Checks for changes in DSR status and reports them to the USB host.
1.4 Library Interface MLA - USB Library Help Device/Peripheral
74

- 1
- 2
…
- 72
- 73
- 74
- 75
- 76
…
- 311
- 312