* $Id$ *
Copyright (C) 2006-2007 by egnite Software GmbH. All rights reserved. Copyright (C) 2008 by egnite GmbH. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
For additional information see http://www.ethernut.de/
* * $Log$ * *
Definiert in Datei config.c.
gehe zum Quellcode dieser Datei
Makrodefinitionen | |
#define | CONFIG_MAGIC "ir1" |
#define | CONFOS_SECTOR 0 |
#define | CONFNET_SECTOR 1 |
#define | CONFIG_SECTOR 2 |
#define | DF_WRITE_POLLS 1000 |
#define | DFCMD_READ_STATUS 0xD7 |
#define | DFCMD_CONT_READ 0xE8 |
#define | DFCMD_BUF1_WRITE 0x84 |
#define | DFCMD_BUF1_FLASH 0x83 |
#define | DFCMD_PAGE_ERASE 0x81 |
#define | VS10XX_XCS_BIT 31 |
#define | VS10XX_XCS_PIO_ID PIOA_ID |
#define | VS10XX_XDCS_BIT 30 |
#define | VS10XX_XDCS_PIO_ID PIOB_ID |
#define | VS10XX_DREQ_BIT 30 |
#define | VS10XX_DREQ_PIO_ID PIOA_ID |
#define | VS10XX_SIGNAL sig_INTERRUPT1 |
#define | VS_XRESET_BIT 31 |
Funktionen | |
int | InitElektorHardware (void) |
int | SpiSetMode (void) |
static u_char | SpiByte (u_char val) |
int | At91SpiTransfer2 (u_int base, u_int cs, CONST void *txbuf, void *rxbuf, int xlen, CONST void *txnbuf, void *rxnbuf, int xnlen) |
size_t | ConfigSize (void) |
Calculate total size of configuration data. | |
void | ConfigFlush (void) |
static void | ConfigPut (u_char ch) |
static u_char | ConfigGet (void) |
void | ConfigSaveString (char *str) |
size_t | ConfigLoadString (char *str, size_t size) |
void | ConfigSaveBinary (void *data, size_t len) |
void | ConfigLoadBinary (void *data, size_t len) |
void | ConfigRewind (u_long pgn) |
int | NutLoadConfig (void) |
Load Nut/OS configuration from non-volatile memory. | |
int | NutSaveConfig (void) |
Save Nut/OS configuration in non-volatile memory. | |
int | NutNetLoadConfig (CONST char *name) |
Load network configuration from non-volatile memory. | |
int | NutNetSaveConfig (void) |
Save network configuration in non-volatile memory. | |
int | ConfigSave (void) |
Save configuration in non volatile memory. | |
int | ConfigLoad (void) |
void | ConfigResetFactory (void) |
Reset configuration to factory defaults. | |
int | ConfigInit (void) |
Variablen | |
static int | at45db |
static u_int | page_size |
HTTP_PROXY | proxy |
HTTP proxy configuration. | |
static u_long | pgnum |
static int | pgpos = -1 |
static u_char | pgbuf [1056] |
CONFOS | confos |
CONFNET | confnet |
#define CONFIG_MAGIC "ir1" |
#define CONFOS_SECTOR 0 |
#define CONFNET_SECTOR 1 |
Definiert in Zeile 63 der Datei config.c.
Wird benutzt von NutNetLoadConfig() und NutNetSaveConfig().
#define CONFIG_SECTOR 2 |
#define VS10XX_XCS_BIT 31 |
#define VS10XX_XDCS_BIT 30 |
#define VS_XRESET_BIT 31 |
int InitElektorHardware | ( | void | ) |
Definiert in Zeile 96 der Datei config.c.
Benutzt VS10XX_XCS_BIT, VS10XX_XDCS_BIT und VS_XRESET_BIT.
Wird benutzt von ConfigInit().
int SpiSetMode | ( | void | ) |
static u_char SpiByte | ( | u_char | val | ) | [static] |
int At91SpiTransfer2 | ( | u_int | base, | |
u_int | cs, | |||
CONST void * | txbuf, | |||
void * | rxbuf, | |||
int | xlen, | |||
CONST void * | txnbuf, | |||
void * | rxnbuf, | |||
int | xnlen | |||
) |
Definiert in Zeile 177 der Datei config.c.
Benutzt SpiByte() und SpiSetMode().
size_t ConfigSize | ( | void | ) |
void ConfigFlush | ( | void | ) |
Definiert in Zeile 248 der Datei config.c.
Wird benutzt von ConfigPut(), ConfigSave(), FavListSave(), NutNetSaveConfig() und NutSaveConfig().
static void ConfigPut | ( | u_char | ch | ) | [static] |
Definiert in Zeile 256 der Datei config.c.
Benutzt ConfigFlush(), page_size, pgbuf, pgnum und pgpos.
Wird benutzt von ConfigSaveBinary() und ConfigSaveString().
static u_char ConfigGet | ( | void | ) | [static] |
Definiert in Zeile 270 der Datei config.c.
Benutzt at45db, page_size, pgbuf, pgnum und pgpos.
Wird benutzt von ConfigLoadBinary() und ConfigLoadString().
void ConfigSaveString | ( | char * | str | ) |
size_t ConfigLoadString | ( | char * | str, | |
size_t | size | |||
) |
void ConfigSaveBinary | ( | void * | data, | |
size_t | len | |||
) |
Definiert in Zeile 302 der Datei config.c.
Wird benutzt von ConfigSave(), NutNetSaveConfig() und NutSaveConfig().
void ConfigLoadBinary | ( | void * | data, | |
size_t | len | |||
) |
Definiert in Zeile 312 der Datei config.c.
Wird benutzt von ConfigLoad(), NutLoadConfig() und NutNetLoadConfig().
void ConfigRewind | ( | u_long | pgn | ) |
Definiert in Zeile 321 der Datei config.c.
Wird benutzt von ConfigLoad(), ConfigSave(), FavListLoad(), FavListSave(), NutLoadConfig(), NutNetLoadConfig(), NutNetSaveConfig() und NutSaveConfig().
int NutLoadConfig | ( | void | ) |
Load Nut/OS configuration from non-volatile memory.
This routine is automatically called during system initialization.
Definiert in Zeile 341 der Datei config.c.
Benutzt ConfigInit(), ConfigLoadBinary(), ConfigRewind(), confos und CONFOS_SECTOR.
Wird benutzt von main().
int NutSaveConfig | ( | void | ) |
Save Nut/OS configuration in non-volatile memory.
Definiert in Zeile 359 der Datei config.c.
Benutzt ConfigFlush(), ConfigRewind(), ConfigSaveBinary(), confos und CONFOS_SECTOR.
Wird benutzt von CgiSettings().
int NutNetLoadConfig | ( | CONST char * | name | ) |
Load network configuration from non-volatile memory.
If no configuration is available in EEPROM, all configuration parameters are cleared to zero. Except the MAC address, which is set to the Ethernet broadcast address.
name | Name of the device. |
Definiert in Zeile 383 der Datei config.c.
Benutzt ConfigInit(), ConfigLoadBinary(), ConfigRewind(), confnet und CONFNET_SECTOR.
int NutNetSaveConfig | ( | void | ) |
Save network configuration in non-volatile memory.
Definiert in Zeile 403 der Datei config.c.
Benutzt ConfigFlush(), ConfigRewind(), ConfigSaveBinary(), confnet und CONFNET_SECTOR.
Wird benutzt von CgiSettings().
int ConfigSave | ( | void | ) |
Save configuration in non volatile memory.
Definiert in Zeile 416 der Datei config.c.
Wird benutzt von CgiSettings() und main().
void ConfigResetFactory | ( | void | ) |
Reset configuration to factory defaults.
Definiert in Zeile 470 der Datei config.c.
Wird benutzt von CgiSettings() und main().
int ConfigInit | ( | void | ) |
Definiert in Zeile 480 der Datei config.c.
Wird benutzt von main(), NutLoadConfig() und NutNetLoadConfig().
int at45db [static] |
Definiert in Zeile 66 der Datei config.c.
Wird benutzt von ConfigFlush(), ConfigGet() und ConfigInit().
u_int page_size [static] |
Definiert in Zeile 67 der Datei config.c.
Wird benutzt von ConfigFlush(), ConfigGet(), ConfigInit() und ConfigPut().
HTTP proxy configuration.
Definiert in Zeile 72 der Datei config.c.
Wird benutzt von CgiSettings(), SendHttpRequest(), ShoutCastGetPlayList(), StationConnect() und TcpHostConnect().
u_long pgnum [static] |
Definiert in Zeile 244 der Datei config.c.
Wird benutzt von ConfigFlush(), ConfigGet(), ConfigPut() und ConfigRewind().
int pgpos = -1 [static] |
Definiert in Zeile 245 der Datei config.c.
Wird benutzt von ConfigFlush(), ConfigGet(), ConfigPut() und ConfigRewind().
u_char pgbuf[1056] [static] |
Definiert in Zeile 246 der Datei config.c.
Wird benutzt von ConfigFlush(), ConfigGet() und ConfigPut().
CONFOS confos |
Definiert in Zeile 330 der Datei config.c.
Wird benutzt von CgiSettings(), main(), NutLoadConfig() und NutSaveConfig().
CONFNET confnet |
Definiert in Zeile 331 der Datei config.c.
Wird benutzt von CgiSettings(), main(), NutNetLoadConfig() und NutNetSaveConfig().