Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: demo.cpp
- Revision:
- 20:88e137b9ea46
- Parent:
- 19:a259bc128867
- Child:
- 21:ea68a8a3cea4
--- a/demo.cpp Thu Sep 15 13:31:53 2016 +0000 +++ b/demo.cpp Mon Sep 26 10:51:02 2016 +0000 @@ -5,6 +5,22 @@ #define SHORT_WAIT 500 #define LONG_WAIT 1000 + +//************************************************************************** +// Demo program that goes through file system based functions +//************************************************************************** +void PICASO_4DGL :: fileSystemDemo() { + + cls(); + screenMode(landscape); // set orientation to landscape + puts("\n\rThis is the File system functions demo"); + wait_ms(LONG_WAIT); + cls(); + + if (file_Mount()) puts("\r FAT16 Mount: OK"); + else puts("\r FAT16 Mount: FAIL"); + +} //************************************************************************** // Demo program that goes through media based functions //************************************************************************** @@ -76,6 +92,15 @@ media_SetSector(1); if (media_WriteByte('a')) puts("\n\r Write Byte : OK"); else puts("\n\r Write Byte : FAIL"); + if (media_Flush()) puts("\n\r Flush : OK"); + else puts("\n\r Flush : FAIL"); + + puts("\n\r Now write one word (2 bytes)"); + //media_SetSector(1); + if (media_WriteWord(19)) puts("\n\r Write Word : OK"); + else puts("\n\r Write Word : FAIL"); + if (media_Flush()) puts("\n\r Flush : OK"); + else puts("\n\r Flush : FAIL"); } //**************************************************************************