LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
DataRam.c File Reference
#include "DataRam.h"
#include <lpc43xx_dualcore_config.h>

Go to the source code of this file.

Data Structures

struct  FAT12_img
 

Macros

#define USBDATARAM   LOCATE_AT(FAT12_DISK_IMAGE)
 

Functions

void DataRam_WriteBlocks (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
 DataRAM write blocks function.
 
void DataRam_ReadBlocks (USB_ClassInfo_MS_Device_t *const MSInterfaceInfo, const uint32_t BlockAddress, uint16_t TotalBlocks)
 DataRAM read blocks function.
 
uint32_t MassStorage_GetAddressInImage (uint32_t startblock, uint16_t requestblocks, uint16_t *availableblocks)
 DataRAM read blocks function.
 
void DataRam_Initialize (void)
 DataRAM Initilisation function.
 

Variables

static int InitializedFlag = 0
 
static const uint8_t FAT12_header []
 
static const uint8_t FAT12_root_dir []
 
static const uint8_t FAT12_file_readme_txt []
 
static const uint8_t FAT12_file_index_htm []
 
static struct FAT12_img FAT12_img []
 
USBDATARAM uint8_t DiskImage [DATA_RAM_PHYSICAL_SIZE]
 

Detailed Description

Functions to manage the physical Dataflash media, including reading and writing of blocks of data. These functions are called by the SCSI layer when data must be stored or retrieved to/from the physical storage media. If a different media is used (such as a SD card or EEPROM), functions similar to these will need to be generated.

Definition in file DataRam.c.

Macro Definition Documentation

#define USBDATARAM   LOCATE_AT(FAT12_DISK_IMAGE)

Definition at line 49 of file DataRam.c.

Variable Documentation

uint8_t DiskImage

Definition at line 50 of file DataRam.c.

const uint8_t FAT12_file_index_htm[]
static
Initial value:
= {
0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a,
0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x09, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x09,
0x09, 0x3c, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65,
0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x09, 0x68, 0x31, 0x20, 0x7b,
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x72, 0x65, 0x64, 0x3b, 0x74, 0x65, 0x78, 0x74, 0x2d, 0x61,
0x6c, 0x69, 0x67, 0x6e, 0x3a, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x3b, 0x7d, 0x0a, 0x09, 0x09,
0x09, 0x68, 0x32, 0x20, 0x7b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x62, 0x6c, 0x75, 0x65, 0x3b,
0x7d, 0x0a, 0x09, 0x09, 0x09, 0x70, 0x20, 0x7b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3a, 0x67, 0x72,
0x65, 0x65, 0x6e, 0x3b, 0x7d, 0x0a, 0x09, 0x09, 0x09, 0x62, 0x6f, 0x64, 0x79, 0x20, 0x7b, 0x62,
0x61, 0x63, 0x6b, 0x67, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x3a, 0x20, 0x52, 0x47, 0x42, 0x28, 0x32,
0x31, 0x35, 0x2c, 0x32, 0x33, 0x32, 0x2c, 0x32, 0x34, 0x34, 0x29, 0x3b, 0x7d, 0x0a, 0x09, 0x09,
0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3e, 0x0a, 0x09, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64,
0x3e, 0x0a, 0x0a, 0x09, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x0a, 0x09, 0x09, 0x3c, 0x68,
0x31, 0x3e, 0x4e, 0x58, 0x50, 0x20, 0x4c, 0x50, 0x43, 0x34, 0x33, 0x58, 0x58, 0x20, 0x44, 0x75,
0x61, 0x6c, 0x20, 0x43, 0x6f, 0x72, 0x65, 0x20, 0x55, 0x53, 0x42, 0x2f, 0x6c, 0x77, 0x49, 0x50,
0x20, 0x44, 0x65, 0x6d, 0x6f, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x68, 0x72,
0x3e, 0x0a, 0x09, 0x09, 0x3c, 0x70, 0x3e, 0x46, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20,
0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x76, 0x69, 0x73, 0x69,
0x74, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x77, 0x77, 0x77, 0x2e, 0x6c, 0x70,
0x63, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0x3e, 0x20, 0x77, 0x77, 0x77, 0x2e,
0x6c, 0x70, 0x63, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x20, 0x3c, 0x2f, 0x61, 0x3e,
0x20, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x0a, 0x09, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a,
0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}

Definition at line 106 of file DataRam.c.

const uint8_t FAT12_file_readme_txt[]
static
Initial value:
= {
0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x55, 0x53, 0x42, 0x20, 0x4d, 0x65,
0x6d, 0x6f, 0x72, 0x79, 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x20, 0x64, 0x65, 0x6d, 0x6f,
0x6e, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
}

Definition at line 100 of file DataRam.c.

const uint8_t FAT12_header[]
static

Definition at line 53 of file DataRam.c.

struct FAT12_img FAT12_img[]
static
Initial value:
const uint8_t FAT12_root_dir[]
static
Initial value:
= {
0x4c, 0x50, 0x43, 0x55, 0x53, 0x42, 0x6c, 0x69, 0x62, 0x20, 0x20, 0x28, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x52, 0x45, 0x41, 0x44, 0x4d, 0x45, 0x20, 0x20, 0x54, 0x58, 0x54, 0x21, 0x00, 0x00, 0x00, 0x00,
0x21, 0x00, 0xbb, 0x32, 0x00, 0x00, 0xdc, 0x83, 0xbb, 0x32, 0x02, 0x00, 0x5d, 0x00, 0x00, 0x00,
0x41, 0x69, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, 0x78, 0x00, 0x0f, 0x00, 0x2f, 0x2e, 0x00,
0x68, 0x00, 0x74, 0x00, 0x6d, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0x49, 0x4e, 0x44, 0x45, 0x58, 0x20, 0x20, 0x20, 0x48, 0x54, 0x4d, 0x20, 0x00, 0x00, 0x0f, 0x93,
0x4a, 0x41, 0x4a, 0x41, 0x00, 0x00, 0x0f, 0x93, 0x4a, 0x41, 0x05, 0x00, 0x68, 0x01, 0x00, 0x00,
}

Definition at line 89 of file DataRam.c.

int InitializedFlag = 0
static

Definition at line 47 of file DataRam.c.