User Interface functions for Bolos TEE.
More...
Go to the source code of this file.
User Interface functions for Bolos TEE.
- Author
- Ledger Firmware Team hello.nosp@m.@led.nosp@m.ger.f.nosp@m.r
- Version
- 1.0
- Date
- 29th of February 2016
The User Interface API let the executed code run simple primitives on the Trusted UI.
This API is specific to the TEE implementation due to memory limitations
#define BLS_UI_CAPS_AVAILABLE (1 << 0) |
#define BLS_UI_CAPS_COLOR (1 << 3) |
#define BLS_UI_CAPS_INAPP (1 << 5) |
UI executes in the application thread
#define BLS_UI_CAPS_MULTILINE (1 << 1) |
UI supports text displayed on several lines
#define BLS_UI_CAPS_QR (1 << 6) |
#define BLS_UI_CAPS_TOUCH (1 << 2) |
UI supports a touch screen
#define BLS_UI_CAPS_USER_ENTRY (1 << 4) |
UI supports user text input
int bls_ui_display_choice |
( |
const char WIDE * |
message | ) |
|
Display a OK/CANCEL choice message.
- Parameters
-
[in] | message | Text message to display |
- Returns
- 1 if OK was selected, 0 if CANCEL was selected or an error occurred
int bls_ui_display_error |
( |
const char WIDE * |
text | ) |
|
Display a simple error.
- Parameters
-
[in] | text | Text message to display |
- Returns
- 1 if success, 0 if error
int bls_ui_display_message |
( |
const char WIDE * |
text | ) |
|
Display a simple information message.
- Parameters
-
[in] | text | Text message to display |
- Returns
- 1 if success, 0 if error
int bls_ui_display_qr |
( |
const char WIDE * |
message, |
|
|
const char WIDE * |
data, |
|
|
size_t |
dataSize |
|
) |
| |
Display a QR code.
- Parameters
-
[in] | message | Text message to display |
[in] | data | Buffer to the data to display as a QR code |
[in] | dataSize | Size of the data to display as a QR code |
- Returns
- 1 if success, 0 if error
int bls_ui_display_warning |
( |
const char WIDE * |
text | ) |
|
Display a simple warning message.
- Parameters
-
[in] | text | Text message to display |
- Returns
- 1 if success, 0 if error
int bls_ui_get_capabilities |
( |
void |
| ) |
|
Return the UI capabilities as a bitmask.
- Returns
- UI capabilities
int bls_ui_get_user_entry |
( |
const char WIDE * |
message, |
|
|
char WIDE * |
out, |
|
|
size_t |
outLength |
|
) |
| |
Retrieve user input.
- Parameters
-
[in] | message | Text message to display |
[out] | out | Buffer to contain the user data |
[in] | outLength | Size of the buffer to contain the user data |
- Returns
- size of the user data collected or 0 if an error occurrred