Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages | Examples

Error handing


Detailed Description

Error value is usually u8, some function return -error. Some b32.

Errors are of 2 kinds:

Defines

Functions


Define Documentation

#define ERR_BAD_FILE
 

Operation cannot be performed on given file. Can be passed to perror().

#define ERR_BAD_INPUT
 

Wrong input inserted. Can be passed to perror().

#define ERR_BAD_PARAMS
 

Bad parameters. Cannot be passed to perror() (too specific to inform user).

#define ERR_BRA_WRONG_CHANNEL
 

Wrong ieee802.15.4 channel set, must be between 11..26.

#define ERR_BRA_WRONG_FREQ
 

Wrong radio frequency set - must be between DEF_BRA_MIN_FREQ and DEF_BRA_MAX_FREQ.

#define ERR_FILE_NOT_FOUND
 

No such file. Cannot be passed to perror() (too specific to inform user).

#define ERR_FILE_TOO_LONG
 

File encryption can be used only on files of limited length (2KB). This is because of required time to perform de/encryption. Can be passed to perror().

#define ERR_MC_NOT_PRESENT
 

Memory card not present. Can be passed to perror().

#define ERR_MC_NOT_READY
 

Memory card not formated. Can be passed to perror().

#define ERR_NO_APP_SLOT
 

No free application slot. There is limited number of applications (=slots) that can be installed. Can be passed to perror().

#define ERR_NO_EEPROM
 

Not enough EEPROM space. Can be passed to perror().

#define ERR_NO_PROGMEM
 

Not enough space in PROGMEM. Can be passed to perror().

#define ERR_NO_PROT_MEM
 

No protected memory block available (protected memory full). Cannot be passed to perror() (too specific to inform user).

#define ERR_NO_RAM
 

Not enough RAM. Can be passed to perror().

#define ERR_NO_SPACE
 

Memory card is full. Can be passed to perror().

#define ERR_PROT_MEM_FORBIDDEN
 

Operation not permitted on protected memory. Cannot be passed to perror() (too specific to inform user).

#define ERR_PROT_MEM_WRONG_BLOCK
 

Wrong block id passed to operation on protected memory. Cannot be passed to perror() (too specific to inform user).

#define ERR_RESOURCE_BUSY
 

Usually for reg_action() or reg_type(). Some actions and files can be registered by only one appliaction. Cannot be passed to perror() (too specific to inform user).

#define ERR_TURBO_LOCKED
 

Turbo is locked, applications cannot be upload, only reset to default is allowed (removes all applications and resets EEPROM). Cannot be passed to perror() (too specific to inform user).

#define ERR_TWOFISH_KEYLEN
 

Wrong requested twofish key length. Keylen can be 16, 24 or 32. Cannot be passed to perror() (too specific to inform user).

#define ERR_UNKNOWN
 

Some unknown error, no better description. Can be passed to perror().

#define ERR_WRONG_KEY
 

Wrong key. Can be passed to perror().

#define ERR_WRONG_POS
 

File system error, read position requested higher than length of file. Cannot be passed to perror() (too specific to inform user).

#define NO_ERROR
 

No error, 0 value.


Function Documentation

u8 perror u8  error_no  ) 
 

Display localized error message text.

Warning:
SIM Toolkit function, usable only in stk_thread().
Parameters:
error_no ERR_NO_PROGMEM, ERR_NO_RAM, ERR_UNKNOWN, ERR_NO_APP_SLOT, ERR_MC_NOT_PRESENT, ERR_MC_NOT_READY, ERR_NO_EEPROM, ERR_BAD_INPUT, ERR_WRONG_KEY, ERR_FILE_TOO_LONG, ERR_NO_SPACE, ERR_BAD_FILE
Returns:
APP_END, APP_BACK
Examples:
fake_sim.c, mc.c, reader.c, test_prot_mem.c, and tsmsacl.c.


Copyright © 2004-2006 BLADOX
Turbo version 1.2