Files

This section refers to the following sample application(s):

  • 02-gpio_net
  • 02-spi_net

 

The 

SmartMesh library

 features a file system, as detailed in File System. The files in the file system can contain arbitrary data, and are typically used to store non-volatile configuration parameters.

Refer to the

SmartMesh On-Chip API html documentation

in the /doc directory of the 

On-Chip SDK repository

for documentation about this feature.

The 02-gpio_net and 02-spi_net Sample Applications

The 02-gpio_net and 02-spi_net sample applications (detailed in the GPIO and SPI pages, respectively) use a file to store the parameters entered by the user.

The format of the file is determined by a struct, and the configuration file for each application has a different name.

When the device boots, the configuration is read from the file, and stored in RAM for use during execution. Each time the user changes the configuration, the updated data is written back to the file.