Revision 8, 1.5 kB
(checked in by phil, 15 years ago)
|
Added Examples etc. from CD
|
Line | |
---|
1 |
/*---------------------------------------------------------------------------- |
---|
2 |
* Name: MEMORY.C |
---|
3 |
* Purpose: USB Mass Storage Demo |
---|
4 |
* Version: V1.10 |
---|
5 |
*---------------------------------------------------------------------------- |
---|
6 |
* This file is part of the uVision/ARM development tools. |
---|
7 |
* This software may only be used under the terms of a valid, current, |
---|
8 |
* end user licence from KEIL for a compatible version of KEIL software |
---|
9 |
* development tools. Nothing else gives you the right to use it. |
---|
10 |
* |
---|
11 |
* Copyright (c) 2005-2007 Keil Software. |
---|
12 |
*---------------------------------------------------------------------------*/ |
---|
13 |
|
---|
14 |
#include <LPC23xx.H> /* LPC23xx definitions */ |
---|
15 |
|
---|
16 |
#include "type.h" |
---|
17 |
|
---|
18 |
#include "usb.h" |
---|
19 |
#include "usbcfg.h" |
---|
20 |
#include "usbhw.h" |
---|
21 |
#include "usbcore.h" |
---|
22 |
#include "mscuser.h" |
---|
23 |
|
---|
24 |
#include "memory.h" |
---|
25 |
|
---|
26 |
extern BYTE Memory[MSC_MemorySize]; /* MSC Memory in RAM */ |
---|
27 |
|
---|
28 |
|
---|
29 |
/* Main Program */ |
---|
30 |
|
---|
31 |
int main (void) { |
---|
32 |
DWORD n; |
---|
33 |
|
---|
34 |
for (n = 0; n < MSC_ImageSize; n++) { /* Copy Initial Disk Image */ |
---|
35 |
Memory[n] = DiskImage[n]; /* from Flash to RAM */ |
---|
36 |
} |
---|
37 |
|
---|
38 |
PINSEL10 = 0; /* Disable ETM Interfaces */ |
---|
39 |
/* LED Setup */ |
---|
40 |
FIO2DIR |= LED_MSK; /* P2[0..7] = Output Only */ |
---|
41 |
|
---|
42 |
USB_Init(); /* USB Initialization */ |
---|
43 |
USB_Connect(TRUE); /* USB Connect */ |
---|
44 |
|
---|
45 |
while (1); /* Loop forever */ |
---|
46 |
} |
---|