Bluetooth® Sample Application Programmer's Reference: UI Main

Bluetooth

Bluetooth® Sample Application Programmer's Reference

Presentation

Functions in charge of peripheral management in the terminal.

Functions

int UI_PeriphStart (void)
 
int UI_PeriphStop (void)
 
void UI_MenuMainDisplay (void)
 
void UI_IdleDispHdrFtrToggle (void)
 
void UI_ErrMsgDisplay (int errID)
 
void UI_PromptMsgDisplay (UI_PromptIdx_t promptID)
 

Macros

#define UI_TIMEOUT_100_MILLISECONDS   100
 100 milliseconds timeout delay used for GUI dialogs More...
 
#define UI_TIMEOUT_3_SECONDS   3000
 3-second timeout delay used for GUI dialogs More...
 
#define UI_TIMEOUT_5_SECONDS   5000
 5-second timeout delay used for GUI dialogs More...
 

Enumerations

enum  UI_PromptIdx_t {
  UI_PROMPT_MSG_START, UI_PROMPT_MSG_ERR_UNDEFINED_ERROR, UI_PROMPT_MSG_INVALID_PORT_NUM, UI_PROMPT_MSG_PAR_FILE_NOT_FOUND,
  UI_PROMPT_MSG_ACCESS_DENIED, UI_PROMPT_MSG_INVALID_DATA, UI_PROMPT_MSG_INVALID_DATA_LEN, UI_PROMPT_MSG_FUNC_NOT_IMPLEMENTED,
  UI_PROMPT_MSG_PAIRING_START, UI_PROMPT_MSG_PAIRING_OK, UI_PROMPT_MSG_PAIRING_FAILED, UI_PROMPT_MSG_PAIRING_STOP,
  UI_PROMPT_MSG_BT_SEARCH, UI_PROMPT_MSG_NO_DEVICE_FOUND, UI_PROMPT_MSG_NO_PAIRED_DEVICE, UI_PROMPT_MSG_IAP_FAILED,
  UI_PROMPT_MSG_TEST_OK, UI_PROMPT_MSG_TEST_FAILED, UI_PROMPT_MSG_END
}
 

Function Documentation

int UI_PeriphStart ( void  )

Starts all user interface peripherals in the terminal ready for used by the application. This includes the keyboard, the display and the touch screen peripherals.

Returns
  • ERR_UI_DISPLAY_PERIPH_DISPLAY_NOT_OPEN = The display peripheral cannot be openned.
  • ERR_UI_DISPLAY_PERIPH_KEYBOARD_NOT_OPEN = The keyboard peripheral cannot be openned.
  • ERR_UI_DISPLAY_PERIPH_TFT_NOT_OPEN = The touch screen peripheral cannot be openned.
int UI_PeriphStop ( void  )

Stops all user interface peripherals in the terminal. It gives up all handles acquired by the terminal with the display and touch screen and the keyboard.

Returns
  • ERR_UI_DISPLAY_PERIPH_DISPLAY_NOT_CLOSE = The display peripheral cannot be closed.
  • ERR_UI_DISPLAY_PERIPH_KEYBOARD_NOT_CLOSE = The keyboard peripheral cannot be closed.
  • ERR_UI_DISPLAY_PERIPH_TFT_NOT_CLOSE = The touch screen peripheral cannot be closed.
void UI_MenuMainDisplay ( void  )

Displays the menu of the sample application.

void UI_IdleDispHdrFtrToggle ( void  )

Toggles the idle display's header/footer. It makes sure that the header and footer are turned off. It will restore the original state of the header/footer display when called the second time.

void UI_ErrMsgDisplay ( int  errID)

Displays an error message.

Precondition
The given error code should have been defined first. Only those defined in err.h.
Parameters
errIDThe error code defined in err.h. See Error Identifiers
Returns
None
void UI_PromptMsgDisplay ( UI_PromptIdx_t  promptID)

Displays a prompt message.

Parameters
[in]promptIDThe identifier of the prompt to be displayed.
Note
When the specified prompt ID does not exist, the function will display a default prompt message indicating an undefined prompt.

Macro Definition Documentation

#define UI_TIMEOUT_100_MILLISECONDS   100

100 milliseconds timeout delay used for GUI dialogs

#define UI_TIMEOUT_3_SECONDS   3000

3-second timeout delay used for GUI dialogs

#define UI_TIMEOUT_5_SECONDS   5000

5-second timeout delay used for GUI dialogs

Enumeration Type Documentation

Indices to the predefined screen prompt list of the application. This indices must be used when calling UI_PromptMsgDisplay(). Note that whatever is defined here should also be defined in the prompt list.

Enumerator
UI_PROMPT_MSG_START 
UI_PROMPT_MSG_ERR_UNDEFINED_ERROR 
UI_PROMPT_MSG_INVALID_PORT_NUM 
UI_PROMPT_MSG_PAR_FILE_NOT_FOUND 
UI_PROMPT_MSG_ACCESS_DENIED 
UI_PROMPT_MSG_INVALID_DATA 
UI_PROMPT_MSG_INVALID_DATA_LEN 
UI_PROMPT_MSG_FUNC_NOT_IMPLEMENTED 
UI_PROMPT_MSG_PAIRING_START 
UI_PROMPT_MSG_PAIRING_OK 
UI_PROMPT_MSG_PAIRING_FAILED 
UI_PROMPT_MSG_PAIRING_STOP 
UI_PROMPT_MSG_BT_SEARCH 
UI_PROMPT_MSG_NO_DEVICE_FOUND 
UI_PROMPT_MSG_NO_PAIRED_DEVICE 
UI_PROMPT_MSG_IAP_FAILED 
UI_PROMPT_MSG_TEST_OK 
UI_PROMPT_MSG_TEST_FAILED 
UI_PROMPT_MSG_END 

Ingenico