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.
Dependencies: EthernetInterface SDFileSystem mbed-rtos mbed
Diff: main.cpp
- Revision:
- 2:e699312248f3
- Parent:
- 1:58d2021e301d
--- a/main.cpp Mon Dec 05 01:07:30 2016 +0000 +++ b/main.cpp Mon Dec 05 22:46:14 2016 +0000 @@ -14,36 +14,37 @@ file_manager fm; char cmd; - cli::print_help(); + cli.welcome(); + cli.print_help(); while(1) { - cmd = cli::get_cmd(); + cmd = cli.get_cmd(); switch(cmd) { case 'm': break; case 'p': - fm::set_path(); + fm.set_path(); break; case 'w': - fm::write_to_file(); + fm.write_to_file(); break; case 'a': - fm::append_to_file(); + fm.append_to_file(); break; case 'r': - fm::read_from_file(); + fm.read_file(); break; default: - pc::printf("Error.\n"); // should never enter this + pc.printf("Error.\n"); // should never enter this break; } } while(1) { - if(!enable.read()) { + if(!true) { //pc.printf("\r\nThis is: %c", cmd); //pc.scanf(cmd); if (pc.writeable()) @@ -56,7 +57,7 @@ while(1) { FILE *fp = fopen("/sd/testfile.txt", "a"); - fprintf(fp, "hello world!\n"); + fprintf(fp, "hello world!\r\n"); fclose(fp); wait(1); }