SD card reader as an USB mass storage device
Dependencies: USBDevice USBMSD_SD mbed
Fork of USBMSD_SD_HelloWorld_FRDM-KL25Z by
main.cpp@1:99b14f22f15b, 2016-05-26 (annotated)
- Committer:
- icserny
- Date:
- Thu May 26 14:01:44 2016 +0000
- Revision:
- 1:99b14f22f15b
- Parent:
- 0:44b579c983e0
First version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
icserny | 1:99b14f22f15b | 1 | /* USBMSD_SD |
icserny | 1:99b14f22f15b | 2 | * |
icserny | 1:99b14f22f15b | 3 | * This is a fork of the USBMSD_SD_HelloWorld_FRDM-KL25Z program of Samuel Mokrani |
icserny | 1:99b14f22f15b | 4 | * Link: https://developer.mbed.org/users/samux/code/USBMSD_SD_HelloWorld_FRDM-KL25Z |
icserny | 1:99b14f22f15b | 5 | * |
icserny | 1:99b14f22f15b | 6 | * The program implements an SD card reader which acts as an USB mass storage device. |
icserny | 1:99b14f22f15b | 7 | * |
icserny | 1:99b14f22f15b | 8 | * Hardware requirements: |
icserny | 1:99b14f22f15b | 9 | * - FRDM-KL25Z board |
icserny | 1:99b14f22f15b | 10 | * - SD card in a socket connected to the SPI port of the FRDM board |
icserny | 1:99b14f22f15b | 11 | * - USB FRDM socket should be connected to a PC (or to other USB host) |
icserny | 1:99b14f22f15b | 12 | */ |
icserny | 1:99b14f22f15b | 13 | |
icserny | 1:99b14f22f15b | 14 | |
samux | 0:44b579c983e0 | 15 | #include "mbed.h" |
samux | 0:44b579c983e0 | 16 | #include "USBMSD_SD.h" |
icserny | 1:99b14f22f15b | 17 | //USBMSD_SD(PinName mosi, PinName miso, PinName sclk, PinName cs); |
samux | 0:44b579c983e0 | 18 | USBMSD_SD sd(PTD2, PTD3, PTD1, PTD0); |
samux | 0:44b579c983e0 | 19 | |
samux | 0:44b579c983e0 | 20 | int main() { |
samux | 0:44b579c983e0 | 21 | while(1); |
samux | 0:44b579c983e0 | 22 | } |