Go to the source code of this file.
Functions | |
size_t | ConfigSize (void) |
Calculate total size of configuration data. | |
int | ConfigStation (uint8_t idx, CONST char *url) |
Configure a station list entry. | |
void | ConfigResetFactory (void) |
Reset configuration. | |
int | ConfigLoad (void) |
Load configuration from EEPROM. | |
void | ConfigSaveControl (void) |
Save radio control settings. | |
void | ConfigSave (void) |
Save configuration in EEPROM. | |
Variables | |
RADIOSTATION * | station |
List of radio stations. | |
RADIOCONTROL | radio |
Radio status and control. |
size_t ConfigSize | ( | void | ) |
Calculate total size of configuration data.
Definition at line 137 of file config.c.
References MAXNUM_STATIONS, RADIOSTATION::rs_ip, RADIOSTATION::rs_port, RADIOSTATION::rs_url, and strlen().
int ConfigStation | ( | uint8_t | idx, | |
CONST char * | url | |||
) |
Configure a station list entry.
idx | Index of the entry. | |
url | URL of the station. |
Definition at line 166 of file config.c.
References atoi(), free, inet_addr(), malloc, MAXNUM_STATIONS, RADIOSTATION::rs_ip, RADIOSTATION::rs_port, RADIOSTATION::rs_url, strcpy(), and strlen().
Referenced by ConfigResetFactory().
void ConfigResetFactory | ( | void | ) |
Reset configuration.
Definition at line 243 of file config.c.
References ConfigStation(), RADIOCONTROL::rc_rstation, and RADIOCONTROL::rc_rvolume.
Referenced by main().
int ConfigLoad | ( | void | ) |
Load configuration from EEPROM.
If no configuration is available, some preconfigured stations are loaded.
Definition at line 331 of file config.c.
References CONFAPP_EE_NAME, CONFAPP_EE_OFFSET, free, malloc, MAXLEN_URL, RADIOCONTROL::rc_rstation, RADIOCONTROL::rc_rvolume, RADIOSTATION::rs_ip, RADIOSTATION::rs_port, RADIOSTATION::rs_url, strcmp(), strcpy(), and strlen().
Referenced by main().
void ConfigSaveControl | ( | void | ) |
Save radio control settings.
Saves currently selected station and volume.
Definition at line 376 of file config.c.
References CONFAPP_EE_NAME, CONFAPP_EE_OFFSET, RADIOCONTROL::rc_cstation, and RADIOCONTROL::rc_cvolume.
void ConfigSave | ( | void | ) |
Save configuration in EEPROM.
Definition at line 388 of file config.c.
References CONFAPP_EE_NAME, CONFAPP_EE_OFFSET, NutNetSaveConfig(), RADIOCONTROL::rc_cstation, RADIOCONTROL::rc_cvolume, RADIOSTATION::rs_ip, RADIOSTATION::rs_port, and RADIOSTATION::rs_url.
List of radio stations.
Definition at line 55 of file config.c.
Referenced by DisplayEntry(), and DisplayStatus().
Radio status and control.
Definition at line 60 of file config.c.
Referenced by DisplayStatus(), and main().