#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "fsaccess.h"
#include "config_file.h"
#include "cptime.h"
#include "shell.h"
#include "FreeRTOS.h"
#include "semphr.h"
#include "task.h"
#include "portmacro.h"
#include "tracedump.h"
#include "compiler.h"
Functions | |
signed short | config_file_get_value (char *filename, char *pcField, char *pcValue) |
get module config, by parsing config file. More... | |
signed short | config_file_set_value (char *filename, int ac, signed char *av[]) |
This function replace a (or many) line(s) in a file. More... | |
signed short config_file_get_value | ( | char * | filename, |
char * | pcField, | ||
char * | pcValue | ||
) |
get module config, by parsing config file.
filename | Input. file to read into. |
pcField | Input. field to find in file. |
pcValue | Output. value read for this field, as string. |
References close, fsaccess_file_get_size(), MAX_CONFIG_FILE_SIZE, NULL, O_RDONLY, open(), pvPortMalloc(), read, and vPortFree().
Referenced by b_joystick_init(), b_light_init(), b_potentiometer_init(), b_pushb1_init(), b_pushb2_init(), b_pushb3_init(), b_temperature_init(), portTASK_FUNCTION(), and prvEthernetConfigureInterface().
signed short config_file_set_value | ( | char * | filename, |
int | ac, | ||
signed char * | av[] | ||
) |
This function replace a (or many) line(s) in a file.
Syntax of the line should be :@verbatim field=value\r\n
filename | Input. The filename to write into. |
ac | Input. The argument counter. For this command, should be 1. |
av | Input. The argument vector. |
References close, CRLF, FS_DATE_LAST_WRITE, fsaccess_file_get_size(), MAX_CONFIG_FILE_SIZE, nav_file_dateset(), NULL, O_RDONLY, O_WRONLY, open(), pcTempoDate, pvPortMalloc(), read, v_cptime_GetDateInFatStringFormat(), vPortFree(), and write.
Referenced by e_ethernet_cmd_set_config(), e_joystick_set_config(), e_light_set_config(), e_potentiometer_set_config(), e_smtpclient_cmd_set_config(), e_temperature_set_config(), e_webserver_cmd_set_config(), and prv_e_pushb_set_config().