#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 151 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 142 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 138 of file main.c.
Media index for different disks RAM disk
Definition at line 147 of file main.c.
SD card
Definition at line 148 of file main.c.
Maximum number of LUNs which can be defined.
Definition at line 145 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 154 of file main.c.
#define RAMDISK_SIZE 128*1024 |
RamDisk size: (WinXP can not format the disk if lower than 20K)
Definition at line 157 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 159 of file main.c.
Initializes drivers and start the USB CDCMSD device.
Definition at line 350 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 219 of file main.c.