Cordio Stack and Cordio Profiles  r2p3-02rel0
app_ui.h File Reference

Application framework user interface. More...

Go to the source code of this file.

Data Structures

struct  appUiSound_t
 Sound data structure. More...
 
struct  appUiLed_t
 LED data structure. More...
 
struct  appUiCback_t
 Callback structure. More...
 

Macros

#define APP_UI_LED_NONE   0x00
 LED values. More...
 
#define APP_UI_LED_1   0x01
 LED 1.
 
#define APP_UI_LED_2   0x02
 LED 2.
 
#define APP_UI_LED_3   0x04
 LED 3.
 
#define APP_UI_LED_4   0x08
 LED 4.
 
#define APP_UI_LED_WRAP   0xFF
 Wrap to beginning of sequence.
 
#define APP_UI_SOUND_WRAP   0xFFFF
 Sound tone value for wrap/repeat.
 

Typedefs

typedef void(* appUiBtnCback_t) (uint8_t btn)
 Button press callback.
 
typedef void(* appUiActionCback_t) (uint8_t event)
 Action event callback.
 
typedef void(* appUiBtnPollCback_t) (void)
 Button Poll callback.
 

Enumerations

enum  {
  APP_UI_NONE,
  APP_UI_RESET_CMPL,
  APP_UI_DISCOVERABLE,
  APP_UI_ADV_START,
  APP_UI_ADV_STOP,
  APP_UI_SCAN_START,
  APP_UI_SCAN_STOP,
  APP_UI_SCAN_REPORT,
  APP_UI_CONN_OPEN,
  APP_UI_CONN_CLOSE,
  APP_UI_SEC_PAIR_CMPL,
  APP_UI_SEC_PAIR_FAIL,
  APP_UI_SEC_ENCRYPT,
  APP_UI_SEC_ENCRYPT_FAIL,
  APP_UI_PASSKEY_PROMPT,
  APP_UI_ALERT_CANCEL,
  APP_UI_ALERT_LOW,
  APP_UI_ALERT_HIGH,
  APP_UI_ADV_SET_START_IND,
  APP_UI_ADV_SET_STOP_IND,
  APP_UI_SCAN_REQ_RCVD_IND,
  APP_UI_EXT_SCAN_START_IND,
  APP_UI_EXT_SCAN_STOP_IND,
  APP_UI_PER_ADV_SET_START_IND,
  APP_UI_PER_ADV_SET_STOP_IND,
  APP_UI_PER_ADV_SYNC_EST_IND,
  APP_UI_PER_ADV_SYNC_LOST_IND,
  APP_UI_HW_ERROR
}
 UI event enumeration. More...
 
enum  {
  APP_UI_BTN_NONE,
  APP_UI_BTN_1_DOWN,
  APP_UI_BTN_1_SHORT,
  APP_UI_BTN_1_MED,
  APP_UI_BTN_1_LONG,
  APP_UI_BTN_1_EX_LONG,
  APP_UI_BTN_2_DOWN,
  APP_UI_BTN_2_SHORT,
  APP_UI_BTN_2_MED,
  APP_UI_BTN_2_LONG,
  APP_UI_BTN_2_EX_LONG
}
 Button press enumeration. More...
 

Functions

APP User Interface

Commands that may be sent via terminal to the application.

void AppUiAction (uint8_t event)
 Perform a user interface action based on the event value passed to the function. More...
 
void AppUiDisplayPasskey (uint32_t passkey)
 Display a passkey. More...
 
void AppUiDisplayConfirmValue (uint32_t confirm)
 Display a confirmation value. More...
 
void AppUiDisplayRssi (int8_t rssi)
 Display an RSSI value. More...
 
void AppUiBtnRegister (appUiBtnCback_t btnCback)
 Register a callback function to receive button presses. More...
 
void AppUiActionRegister (appUiActionCback_t actionCback)
 Register a callback function to receive action events. More...
 
void AppUiBtnPollRegister (appUiBtnPollCback_t btnPollCback)
 Register a callback function to receive APP_BTN_POLL_IND events. More...
 
void AppUiBtnPressed (void)
 Handle a hardware button press. This function is called to handle WSF event APP_BTN_DOWN_EVT. More...
 
void AppUiSoundPlay (const appUiSound_t *pSound)
 Play a sound. More...
 
void AppUiSoundStop (void)
 Stop the sound that is currently playing. More...
 
void AppUiLedStart (const appUiLed_t *pLed)
 Start LED blinking. More...
 
void AppUiLedStop (void)
 Stop LED blinking. More...
 
void AppUiBtnTest (uint8_t btn)
 Button test function– for test purposes only. More...
 

Description

Application framework user interface.

Copyright (c) 2011-2018 Arm Ltd. All Rights Reserved. ARM Ltd. confidential and proprietary.

IMPORTANT. Your use of this file is governed by a Software License Agreement ("Agreement") that must be accepted in order to download or otherwise receive a copy of this file. You may not use or copy this file for any purpose other than as described in the Agreement. If you do not agree to all of the terms of the Agreement do not use this file and delete all copies in your possession or control; if you do not have a copy of the Agreement, you must contact ARM Ltd. prior to any use, copying or further distribution of this software.

Definition in file app_ui.h.