📄 env_api.h
字号:
* --------------- * TRUE -> OK, FALSE -> Failed ************************************************************************/bool env_decode_fileprot( char *raw, /* The string */ void *decoded, /* Decoded data */ UINT32 size ); /* Size of decoded data *//* Functions for converting an enumerated value to string describing * the value *//************************************************************************ * env_baudrate_num2s ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_baudrate_num2s( UINT32 param, char **s );/************************************************************************ * env_databits_num2s ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_databits_num2s( UINT32 param, char **s);/************************************************************************ * env_parity_num2s ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_parity_num2s( UINT32 param, char **s );/************************************************************************ * env_stopbits_num2s ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_stopbits_num2s( UINT32 param, char **s );/************************************************************************ * env_flowctrl_num2s ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_flowctrl_num2s( UINT32 param, char **s );/* Functions for converting string describing a serial port setting * to corresponding enumerated value. *//************************************************************************ * env_baudrate_s2num ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_baudrate_s2num( char *raw, /* The string */ void *decoded, /* Decoded data */ UINT32 size ); /* Size of decoded data *//************************************************************************ * env_databits_s2num ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_databits_s2num( char *raw, /* The string */ void *decoded, /* Decoded data */ UINT32 size ); /* Size of decoded data *//************************************************************************ * env_parity_s2num ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_parity_s2num( char *raw, /* The string */ void *decoded, /* Decoded data */ UINT32 size ); /* Size of decoded data *//************************************************************************ * env_stopbits_s2num ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_stopbits_s2num( char *raw, /* The string */ void *decoded, /* Decoded data */ UINT32 size ); /* Size of decoded data *//************************************************************************ * env_flowctrl_s2num ************************************************************************/bool /* TRUE -> OK, FALSE -> Not OK */env_flowctrl_s2num( char *raw, /* The string */ void *decoded, /* Decoded data */ UINT32 size ); /* Size of decoded data *//************************************************************************ * * env_mac_s2num * Description : * ------------- * * Decode a string of format xx.xx.xx.xx.xx.xx to 6 bytes * * Return values : * --------------- * * TRUE -> OK, FALSE -> Failed * ************************************************************************/bool env_mac_s2num( char *raw, /* The string */ void *decoded, /* Decoded data */ UINT32 size ); /* Size of decoded data *//************************************************************************ * * env_get * Description : * ------------- * * Lookup environment variable based on name * * Return values : * --------------- * * TRUE -> found, FALSE -> not found * ************************************************************************/boolenv_get( char *name, /* Name of environment variable */ char **raw, /* Raw text string */ void *decoded, /* Decoded data */ UINT32 size ); /* Size of decoded data *//************************************************************************ * * env_set * Description : * ------------- * * Set (and possibly create) environment variable * * Return values : * --------------- * * OK if no error, else error code * ************************************************************************/UINT32env_set( char *name, char *value, UINT8 attr,#define ENV_ATTR_USER 0#define ENV_ATTR_RO 1#define ENV_ATTR_RW 2 char *default_value, t_env_decode decode );/************************************************************************ * * env_unset * Description : * ------------- * * Delete environment variable * * Return values : * --------------- * * OK if no error, else error code * ************************************************************************/UINT32env_unset( char *name ); /* Name of variable *//************************************************************************ * * env_print_all * Description : * ------------- * * Display all env. variables * * Return values : * --------------- * * None * ************************************************************************/voidenv_print_all( void );/************************************************************************ * * env_remove * Description : * ------------- * * Remove all user and or system variables * * Return values : * --------------- * * Error code (OK = No error) * ************************************************************************/UINT32env_remove( bool user, /* TRUE -> remove user variables */ bool system ); /* TRUE -> remove system variables *//************************************************************************ * * env_get_all * Description : * ------------- * * Get a pointer to the array of environment variables * * Return values : * --------------- * * Pointer to array of env. variables * ************************************************************************/t_env_var*env_get_all( void );/************************************************************************ * * env_check * Description : * ------------- * * Determine whether env. variables have been corrupted (due to flash * corruption). If this is the case, print warning. * * Return values : * --------------- * * TRUE -> corrupted, FALSE -> not corrupted (normal state) * ************************************************************************/boolenv_check(void);#endif /* #ifndef ENV_API_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -