70 #define BUFFER_SIZE 0x40
103 str[4 + stSize] =
'\0';
106 DEBUGSTR(
"Stored string found in Flash\r\n");
112 DEBUGSTR(
"No string stored in the Flash\r\n");
123 DEBUGSTR(
"\r\nEnter a string to write into Flash\r\n");
124 DEBUGSTR(
"Up to 32 bytes in length, press ESC to accept\r\n");
132 #if defined(DEBUG_ENABLE)
134 while ((index < 32) && (byte !=
ESC_CHAR)) {
136 strOut[0] = str[4 + index] = (uint8_t) byte;
149 strncpy((
char *) &str[4],
"12345678", 8);
153 str[3] = (uint8_t) index;
185 uint16_t manufacturerID, deviceID;
188 volatile int loop = 1;
195 DEBUGOUT(
" Flash Information: \r\n");
196 DEBUGOUT(
" Manufacturer ID: 0x%04x\r\n", manufacturerID);
197 DEBUGOUT(
" Device ID: 0x%04x\r\n", deviceID);
198 DEBUGOUT(
" Size: %08dKB\r\n", flash_size / 1024);
199 DEBUGOUT(
" Sector Count: %08d\r\n", sector_count);
214 for (loop = 0; loop < 25 * 40000; loop++) {}
217 DEBUGSTR(
"\r\nWrite to flash...\r\n");
220 DEBUGSTR(
"Reading back string...\r\n");