App to configure a DDS (AD9854) using a K64F. USB an Ethernet were used as interface.

Dependencies:   jro mbed AD9854 mbed-rtos I2CLCD k64f_EthLink SerialDriver FreescaleIAP EthernetInterface

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers test_iap.cpp Source File

test_iap.cpp

00001 #include "mbed.h"
00002 #include "FreescaleIAP.h"
00003  
00004  #if 0
00005 int main() {
00006     int address = flash_size() - SECTOR_SIZE;           //Write in last sector
00007     
00008     int *data = (int*)address;
00009     char *data_str = (char*)address;
00010     printf("Starting\r\n"); 
00011     erase_sector(address);
00012     int numbers[10] = {0, 1, 10, 100, 1000, 10000, 1000000, 10000000, 100000000, 1000000000};
00013     char *ip = "a12b3c4d5";
00014     //program_flash(address, (char*)&numbers, 40);        //10 integers of 4 bytes each: 40 bytes length
00015     program_flash(address, ip, strlen(ip));                     //15 chars of 4 bytes each: 60 bytes length
00016     printf("Resulting flash: \r\n");
00017     //for (int i = 0; i<10; i++)
00018         //printf("%d\r\n", data[i]);
00019     //
00020     printf("%s\r\n", data_str);
00021     printf("Done\r\n\n");
00022         
00023  
00024     while (true) {
00025     }
00026 }
00027 #endif