Changes between Version 5 and Version 6 of Docs/Prog/Manual/DeviceSupport/USB


Ignore:
Timestamp:
02/19/10 13:12:47 (14 years ago)
Author:
Don Wilson
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Docs/Prog/Manual/DeviceSupport/USB

    v5 v6  
    1717
    1818The file manager may be used to access USB flash drives. When the /mnt/fl1 folder is selected the file manager will automatically perform the mount command.
     19
     20=== Accessing USB storage from a program ===
     21
     22{{{
     23system("mount -t vfat /dev/sda1 /mnt/fl1");
     24
     25FILE* file = fopen("/mnt/fl1/outfile.txt", "w");
     26if(file != NULL)
     27{
     28   fprintf(file, "Gross Weight %g\r\n", wtdata[1].grosswt);
     29}
     30fclose(file);
     31
     32system("umount /mnt/fl1");
     33
     34}}}
     35This example will mount the flash device, write a file to it, and then unmount the device.
    1936
    2037[[Top]]