# 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
…
- 69
- 70
- 71
- 72
- 73
…
- 311
- 312

Module
Audio Function Driver
Description
This is file usb_device_audio.h.
1.4.1.3 CDC Function Driver
Files
Name Description
usb_device_cdc.h This is file usb_device_cdc.h.
Description
1.4.1.3.1 usb_device_cdc.h
Functions
Name Description
CDCInitEP 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).
CDCNotificationHandler Checks for changes in DSR status and reports them to the USB host.
CDCTxService CDCTxService handles device-to-host transaction(s). This function
should be called once per Main Program loop after the device reaches
the configured state.
getsUSBUSART getsUSBUSART copies a string of BYTEs received through USB CDC
Bulk OUT endpoint to a user's specified location. It is a non-blocking
function. It does not wait for data if there is no data available. Instead it
returns '0' to notify the caller that there is no data available.
putrsUSBUSART putrsUSBUSART writes a string of data to the USB including the null
character. Use this version, 'putrs', to transfer data literals and data
located in program memory.
putsUSBUSART putsUSBUSART writes a string of data to the USB including the null
character. Use this version, 'puts', to transfer data from a RAM buffer.
putUSBUSART putUSBUSART writes an array of data to the USB. Use this version, is
capable of transfering 0x00 (what is typically a NULL character in any of
the string transfer functions).
USBCDCEventHandler Handles events from the USB stack, which may have an effect on the
CDC endpoint(s).
USBCheckCDCRequest This routine checks the most recently received SETUP data packet to
see if the request is specific to the CDC class. If the request was a CDC
specific request, this function will take care of handling the request and
responding appropriately.
Macros
Name Description
CDCSetBaudRate This macro is used set the baud rate reported back to the host during a
get line coding request. (optional)
CDCSetCharacterFormat This macro is used manually set the character format reported back to
the host during a get line coding request. (optional)
CDCSetDataSize This function is used manually set the number of data bits reported back
to the host during a get line coding request. (optional)
1.4 Library Interface MLA - USB Library Help Device/Peripheral
71

- 1
- 2
…
- 69
- 70
- 71
- 72
- 73
…
- 311
- 312