#include "board.h"
#include "libstoragemedia.h"
#include <USBD_Config.h>
#include <CDCMSDDriver.h>
#include <CDCDSerial.h>
#include <MSDFunction.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
Go to the source code of this file.
Detailed Description
Purpose
This file contains all the specific code for the usb_iad_cdc_msd project
Definition in file main.c.
Define Documentation
Size of one block in bytes.
Definition at line 152 of file main.c.
#define DATABUFFERSIZE (DATAPACKETSIZE+2) |
Size in bytes of the buffer used for reading data from the USB & USART
Definition at line 143 of file main.c.
#define DATAPACKETSIZE CHIP_USB_ENDPOINTS_MAXPACKETSIZE(CDCDSerialDriverDescriptors_DATAIN) |
Size in bytes of the packet used for reading data from USB
Definition at line 139 of file main.c.
Media index for different disks RAM disk
Definition at line 148 of file main.c.
SD card
Definition at line 149 of file main.c.
Maximum number of LUNs which can be defined.
Definition at line 146 of file main.c.
#define MSD_BUFFER_SIZE (12*BLOCK_SIZE) |
Size of the MSD IO buffer in bytes (6K, more the better).
Definition at line 155 of file main.c.
#define RAMDISK_SIZE 128*1024 |
RamDisk size: (WinXP can not format the disk if lower than 20K)
Definition at line 158 of file main.c.
Function Documentation
COMPILER_SECTION |
( |
"ramdisk_region" |
|
) |
|
Invoked when the configuration of the device changes. Parse used endpoints.
- Parameters:
-
| cfgnum | New configuration number. |
Definition at line 160 of file main.c.
Initializes drivers and start the USB CDCMSD device.
Definition at line 353 of file main.c.
Invoked when a new SETUP request is received from the host. Forwards the request to the Mass Storage device driver handler function.
- Parameters:
-
Definition at line 221 of file main.c.