Go to the source code of this file.
Data Structures | |
struct | RADIOSTATION |
struct | RADIOCONTROL |
Defines | |
#define | CONFAPP_EE_OFFSET 512 |
#define | CONFAPP_EE_NAME "NUTPIPER" |
#define | MAXLEN_URL 32 |
#define | MAXNUM_STATIONS 128 |
#define | NEXT_STATION 255 |
#define | PREV_STATION 254 |
#define | DIST_NONE 0 |
#define | DIST_WAIT 1 |
#define | DIST_CONNECTING 2 |
#define | DIST_CONNECTED 3 |
#define | DIST_BUFFER 4 |
#define | DIST_TITLE 5 |
#define | DIST_STATION 6 |
#define | DIST_VOLUME 7 |
#define | DIST_DEAD 8 |
#define | DIST_FORCE 9 |
Functions | |
size_t | ConfigSize (void) |
Calculate total size of configuration data. | |
int | ConfigLoad (void) |
Load configuration from EEPROM. | |
void | ConfigResetFactory (void) |
Reset configuration. | |
void | ConfigSave (void) |
Save configuration in EEPROM. | |
void | ConfigSaveControl (void) |
Save radio control settings. | |
int | ConfigStation (u_char idx, CONST char *url) |
Configure a station list entry. | |
Variables | |
RADIOSTATION * | station |
List of radio stations. | |
RADIOCONTROL | radio |
Radio status and control. |
#define CONFAPP_EE_OFFSET 512 |
$Log$ Revision 1.2 2009/02/18 12:18:58 olereinhardt 2009-02-18 Ole Reinhardt <ole.reinhardt@thermotemp.de>
Fixed compilier warnings. Especialy signedness of char buffers as well as unused code on arm platform and main functions without return value
Revision 1.1 2003/07/21 17:50:48 haraldkipp First check in
Definition at line 51 of file config.h.
Referenced by ConfigLoad(), ConfigSave(), and ConfigSaveControl().
#define CONFAPP_EE_NAME "NUTPIPER" |
Definition at line 52 of file config.h.
Referenced by ConfigLoad(), ConfigSave(), and ConfigSaveControl().
#define MAXLEN_URL 32 |
#define MAXNUM_STATIONS 128 |
Definition at line 55 of file config.h.
Referenced by ConfigSize(), and ConfigStation().
#define NEXT_STATION 255 |
#define PREV_STATION 254 |
#define DIST_NONE 0 |
#define DIST_CONNECTING 2 |
Definition at line 76 of file config.h.
Referenced by DisplayStatus().
#define DIST_CONNECTED 3 |
Definition at line 77 of file config.h.
Referenced by DisplayStatus().
#define DIST_DEAD 8 |
Definition at line 82 of file config.h.
Referenced by DisplayStatus().
#define DIST_FORCE 9 |
Definition at line 83 of file config.h.
Referenced by DisplayStatus().
size_t ConfigSize | ( | void | ) |
Calculate total size of configuration data.
Definition at line 156 of file config.c.
References MAXNUM_STATIONS, RADIOSTATION::rs_ip, RADIOSTATION::rs_port, RADIOSTATION::rs_url, and strlen().
int ConfigLoad | ( | void | ) |
Load configuration from EEPROM.
If no configuration is available, some preconfigured stations are loaded.
Definition at line 350 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 ConfigResetFactory | ( | void | ) |
Reset configuration.
Definition at line 262 of file config.c.
References ConfigStation(), RADIOCONTROL::rc_rstation, and RADIOCONTROL::rc_rvolume.
Referenced by main().
void ConfigSave | ( | void | ) |
Save configuration in EEPROM.
Definition at line 407 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.
void ConfigSaveControl | ( | void | ) |
Save radio control settings.
Saves currently selected station and volume.
Definition at line 395 of file config.c.
References CONFAPP_EE_NAME, CONFAPP_EE_OFFSET, RADIOCONTROL::rc_cstation, and RADIOCONTROL::rc_cvolume.
int ConfigStation | ( | u_char | idx, | |
CONST char * | url | |||
) |
Configure a station list entry.
idx | Index of the entry. | |
url | URL of the station. |
Definition at line 185 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().
List of radio stations.
$Log$ Revision 1.5 2009/02/18 12:18:58 olereinhardt 2009-02-18 Ole Reinhardt <ole.reinhardt@thermotemp.de>
Fixed compilier warnings. Especialy signedness of char buffers as well as unused code on arm platform and main functions without return value
Revision 1.4 2006/07/21 09:06:36 haraldkipp Exclude AVR specific parts from building for other platforms. This does not imply, that all samples are working on all platforms.
Revision 1.3 2004/05/11 17:23:05 drsung Advanced radio stations are now used depending of macro ETHERNUT2.
Revision 1.2 2003/11/04 17:46:52 haraldkipp Adapted to Ethernut 2
Revision 1.1 2003/07/21 17:50:48 haraldkipp First check in
Definition at line 74 of file config.c.
Referenced by DisplayEntry(), and DisplayStatus().
Radio status and control.
Definition at line 79 of file config.c.
Referenced by DisplayStatus(), and main().