This program is an example of of using the MSCUSBHost code with a raw build of ELM Chan Fat Fs. This was done to add both Long File Name Support along with proper time/date stamps (assuming you have a battery hooked up to keep time). This code exposes the Chan API (see main.cpp) and is NOT a c++ class: http://elm-chan.org/fsw/ff/00index_e.html The diskio.c file has the mapping needed to link the filesystem to the MSC stuff
USBHostLite/usbhost_err.h@0:2dbbafe1b1fb, 2011-01-23 (annotated)
- Committer:
- emh203
- Date:
- Sun Jan 23 18:35:43 2011 +0000
- Revision:
- 0:2dbbafe1b1fb
1st test version. Test with raw mbed and Samtec USB-RA type A connector wired directly to pins.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emh203 | 0:2dbbafe1b1fb | 1 | /* |
emh203 | 0:2dbbafe1b1fb | 2 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 3 | * NXP USB Host Stack |
emh203 | 0:2dbbafe1b1fb | 4 | * |
emh203 | 0:2dbbafe1b1fb | 5 | * (c) Copyright 2008, NXP SemiConductors |
emh203 | 0:2dbbafe1b1fb | 6 | * (c) Copyright 2008, OnChip Technologies LLC |
emh203 | 0:2dbbafe1b1fb | 7 | * All Rights Reserved |
emh203 | 0:2dbbafe1b1fb | 8 | * |
emh203 | 0:2dbbafe1b1fb | 9 | * www.nxp.com |
emh203 | 0:2dbbafe1b1fb | 10 | * www.onchiptech.com |
emh203 | 0:2dbbafe1b1fb | 11 | * |
emh203 | 0:2dbbafe1b1fb | 12 | * File : usbhost_err.h |
emh203 | 0:2dbbafe1b1fb | 13 | * Programmer(s) : Ravikanth.P |
emh203 | 0:2dbbafe1b1fb | 14 | * Version : |
emh203 | 0:2dbbafe1b1fb | 15 | * |
emh203 | 0:2dbbafe1b1fb | 16 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 17 | */ |
emh203 | 0:2dbbafe1b1fb | 18 | |
emh203 | 0:2dbbafe1b1fb | 19 | #ifndef USBHOST_ERR_H |
emh203 | 0:2dbbafe1b1fb | 20 | #define USBHOST_ERR_H |
emh203 | 0:2dbbafe1b1fb | 21 | |
emh203 | 0:2dbbafe1b1fb | 22 | |
emh203 | 0:2dbbafe1b1fb | 23 | /* |
emh203 | 0:2dbbafe1b1fb | 24 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 25 | * GENERAL DEFINITIONS |
emh203 | 0:2dbbafe1b1fb | 26 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 27 | */ |
emh203 | 0:2dbbafe1b1fb | 28 | |
emh203 | 0:2dbbafe1b1fb | 29 | #define OK 0 |
emh203 | 0:2dbbafe1b1fb | 30 | #define MATCH_FOUND 0 |
emh203 | 0:2dbbafe1b1fb | 31 | |
emh203 | 0:2dbbafe1b1fb | 32 | /* |
emh203 | 0:2dbbafe1b1fb | 33 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 34 | * HOST CONTROLLER SPECIFIC ERROR CODES |
emh203 | 0:2dbbafe1b1fb | 35 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 36 | */ |
emh203 | 0:2dbbafe1b1fb | 37 | |
emh203 | 0:2dbbafe1b1fb | 38 | #define ERR_TD_FAIL -1 |
emh203 | 0:2dbbafe1b1fb | 39 | |
emh203 | 0:2dbbafe1b1fb | 40 | /* |
emh203 | 0:2dbbafe1b1fb | 41 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 42 | * MASS STORAGE SPECIFIC ERROR CODES |
emh203 | 0:2dbbafe1b1fb | 43 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 44 | */ |
emh203 | 0:2dbbafe1b1fb | 45 | |
emh203 | 0:2dbbafe1b1fb | 46 | #define ERR_MS_CMD_FAILED -10 |
emh203 | 0:2dbbafe1b1fb | 47 | #define ERR_BAD_CONFIGURATION -11 |
emh203 | 0:2dbbafe1b1fb | 48 | #define ERR_NO_MS_INTERFACE -12 |
emh203 | 0:2dbbafe1b1fb | 49 | |
emh203 | 0:2dbbafe1b1fb | 50 | /* |
emh203 | 0:2dbbafe1b1fb | 51 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 52 | * FAT SPECIFIC ERROR CODES |
emh203 | 0:2dbbafe1b1fb | 53 | ************************************************************************************************************** |
emh203 | 0:2dbbafe1b1fb | 54 | */ |
emh203 | 0:2dbbafe1b1fb | 55 | |
emh203 | 0:2dbbafe1b1fb | 56 | #define MATCH_NOT_FOUND -20 |
emh203 | 0:2dbbafe1b1fb | 57 | #define ERR_FAT_NOT_SUPPORTED -21 |
emh203 | 0:2dbbafe1b1fb | 58 | #define ERR_OPEN_LIMIT_REACHED -22 |
emh203 | 0:2dbbafe1b1fb | 59 | #define ERR_INVALID_BOOT_SIG -23 |
emh203 | 0:2dbbafe1b1fb | 60 | #define ERR_INVALID_BOOT_SEC -24 |
emh203 | 0:2dbbafe1b1fb | 61 | #define ERR_ROOT_DIR_FULL -25 |
emh203 | 0:2dbbafe1b1fb | 62 | |
emh203 | 0:2dbbafe1b1fb | 63 | #endif |