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.
Revision 0:fa25ccf0bf62, committed 2012-04-05
- Comitter:
- elmicro
- Date:
- Thu Apr 05 10:18:19 2012 +0000
- Commit message:
- Initial Revision
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FM25W256.lib Thu Apr 05 10:18:19 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/elmicro/code/FM25W256/#2290931492e7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Apr 05 10:18:19 2012 +0000
@@ -0,0 +1,45 @@
+#include "mbed.h"
+#include "fm25w256.h"
+
+Serial pc(USBTX, USBRX);
+
+int main()
+{
+ unsigned char cRX[16];
+ unsigned char cTX[16];
+ int x;
+
+ for(x=0; x<16; x++) cRX[x]=0;
+ for(x=0; x<16; x++) cTX[x]=0;
+
+ FM25W_SSP1_Init();
+
+ pc.printf("\nOut of reset, memory contained:\n");
+ FM25W_ReadBlock(0,cRX,16); //read 16 bytes
+ for(x=0; x<16; x++) pc.printf("%02X ", cRX[x]); //display them
+
+ FM25W_WriteBlock(0, cTX, 16); //clear memory addresses
+
+ for(x=0; x<16; x++) cTX[x]=x; //prepare sample bytes
+
+ pc.printf("\nMemory 'before' contains:\n");
+ FM25W_ReadBlock(0,cRX,16); //read 16 bytes
+ for(x=0; x<16; x++) pc.printf("%02X ", cRX[x]); //display them
+
+ pc.printf("\nWriting data to memory...");
+ FM25W_WriteBlock(0,cTX,16); //write 16 bytes
+
+ for(x=0; x<16; x++) cRX[x]=0; //clear RX buffer
+
+ pc.printf("\nReading data from memory...");
+ FM25W_ReadBlock(0,cRX,16); //read 16 bytes
+
+ pc.printf("\nMemory 'after' contains:\n");
+ for(x=0; x<16; x++) pc.printf("%02X ", cRX[x]); //display bytes
+
+
+ while(1)
+ {
+
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Apr 05 10:18:19 2012 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/737756e0b479