Fix according to review

This commit is contained in:
Kartik 2017-03-02 13:16:12 +05:30 committed by GitHub
parent 51ac5111c5
commit d4812f0118

View File

@ -6,8 +6,8 @@
enum enum
{ {
ERROR_LANGUAGE_FLAG = 0x100, ///<??-Unknown flag ERROR_LANGUAGE_FLAG = 0x100, ///<??-Unknown flag
ERROR_WORD_WRAP_FLAG = 0x200 ///<??-Unknown flag ERROR_WORD_WRAP_FLAG = 0x200 ///<??-Unknown flag
}; };
/* /*
@ -15,26 +15,26 @@ Type of Error applet to be called
*/ */
typedef enum typedef enum
{ {
ERROR_CODE = 0, ///< Displays the infrastructure communications-related error message corresponding to the error code. ERROR_CODE = 0, ///< Displays the infrastructure communications-related error message corresponding to the error code.
ERROR_TEXT, ///< Displays text passed to this applet. ERROR_TEXT, ///< Displays text passed to this applet.
EULA, ///< Displays the EULA EULA, ///< Displays the EULA
ERROR_TYPE_EULA_FIRST_BOOT, ///< Use prohibited. ERROR_TYPE_EULA_FIRST_BOOT, ///< Use prohibited.
ERROR_TYPE_EULA_DRAW_ONLY, ///< Use prohibited. ERROR_TYPE_EULA_DRAW_ONLY, ///< Use prohibited.
ERROR_TYPE_AGREE, ///< Use prohibited. ERROR_TYPE_AGREE, ///< Use prohibited.
ERROR_CODE_LANGUAGE = ERROR_CODE | ERROR_LANGUAGE_FLAG , ///< Displays a network error message in a specified language. ERROR_CODE_LANGUAGE = ERROR_CODE | ERROR_LANGUAGE_FLAG, ///< Displays a network error message in a specified language.
ERROR_TEXT_LANGUAGE = ERROR_TEXT | ERROR_LANGUAGE_FLAG, ///< Displays text passed to this applet in a specified language. ERROR_TEXT_LANGUAGE = ERROR_TEXT | ERROR_LANGUAGE_FLAG, ///< Displays text passed to this applet in a specified language.
EULA_LANGUAGE = EULA | ERROR_LANGUAGE_FLAG, ///< Displays EULA in a specified language. EULA_LANGUAGE = EULA | ERROR_LANGUAGE_FLAG, ///< Displays EULA in a specified language.
ERROR_TEXT_WORD_WRAP = ERROR_TEXT | ERROR_WORD_WRAP_FLAG, ///< Displays the custom error message passed to this applet with automatic line wrapping ERROR_TEXT_WORD_WRAP = ERROR_TEXT | ERROR_WORD_WRAP_FLAG, ///< Displays the custom error message passed to this applet with automatic line wrapping
ERROR_TEXT_LANGUAGE_WORD_WRAP = ERROR_TEXT | ERROR_LANGUAGE_FLAG | ERROR_WORD_WRAP_FLAG, ///< Displays the custom error message with automatic line wrapping and in the specified language. ERROR_TEXT_LANGUAGE_WORD_WRAP = ERROR_TEXT | ERROR_LANGUAGE_FLAG | ERROR_WORD_WRAP_FLAG, ///< Displays the custom error message with automatic line wrapping and in the specified language.
}ErrorType; }ErrorType;
///< Flags for the Upper Screen.Does nothing even if specified. ///< Flags for the Upper Screen.Does nothing even if specified.
typedef enum typedef enum
{ {
NORMAL = 0, NORMAL = 0,
STEREO, STEREO,
}screen_flag; }screen_flag;
@ -42,20 +42,20 @@ typedef enum
typedef enum typedef enum
{ {
DEFAULT = 0, DEFAULT = 0,
JAPANESE, JAPANESE,
ENGLISH, ENGLISH,
FRENCH, FRENCH,
GERMAN, GERMAN,
ITALIAN, ITALIAN,
SPANISH, SPANISH,
SIMP_CHINESE, SIMP_CHINESE,
KOREAN, KOREAN,
DUTCH, DUTCH,
PORTUGUESE, PORTUGUESE,
RUSSIAN, RUSSIAN,
TRAD_CHINESE, TRAD_CHINESE,
}err_lang; }err_lang;
@ -63,39 +63,29 @@ typedef enum
typedef enum typedef enum
{ {
UNKNOWN = -1, UNKNOWN = -1,
NONE = 0, NONE = 0,
SUCCESS, SUCCESS,
NOT_SUPPORTED, NOT_SUPPORTED,
HOME_BUTTON = 10, HOME_BUTTON = 10,
SOFTWARE_RESET, SOFTWARE_RESET,
POWER_BUTTON, POWER_BUTTON,
}ReturnCode; }ReturnCode;
///< Structure to be passed to the applet.Shouldn't be modified directly. ///< Structure to be passed to the applet.Shouldn't be modified directly.
typedef struct typedef struct
{ {
ErrorType errorType; ErrorType errorType;
int errorCode;
int errorCode; screen_flag upperScreenFlag;
err_lang useLanguage;
screen_flag upperScreenFlag; u16 Text[1900];
bool homeButton;
err_lang useLanguage; bool softwareReset;
bool appJump;
u16 Text[1900]; ReturnCode returnCode;
u16 eulaVersion;
bool homeButton;
bool softwareReset;
bool appJump;
ReturnCode returnCode;
u16 eulaVersion;
}ErrConf; }ErrConf;
/** /**
* @brief Init the error applet. * @brief Init the error applet.