--- C:\ti\simplelink_cc2640r2_sdk_3_40_00_10\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_peripheral\src\app\simple_peripheral.c	Mon Feb 10 14:52:29 2020
+++ C:\ti\simplelink_cc2640r2_sdk_3_40_00_10\examples\rtos\CC2640R2_LAUNCHXL\ble5stack\simple_peripheral\src\app\simple_peripheral_SIMPLE.c	Tue Feb 11 08:08:37 2020
@@ -55,8 +55,6 @@
 #include <ti/sysbios/knl/Event.h>
 #include <ti/sysbios/knl/Queue.h>
 
-#include <ti/display/Display.h>
-
 #if !(defined __TI_COMPILER_VERSION__)
 #include <intrinsics.h>
 #endif
@@ -77,11 +75,7 @@
 #endif //USE_RCOSC
 
 #include <board.h>
-#include <board_key.h>
-
-#include <menu/two_btn_menu.h>
-
-#include "simple_peripheral_menu.h"
+
 #include "simple_peripheral.h"
 
 #ifdef PTM_MODE
@@ -141,7 +135,6 @@
 // Application events
 #define SP_STATE_CHANGE_EVT                  0
 #define SP_CHAR_CHANGE_EVT                   1
-#define SP_KEY_CHANGE_EVT                    2
 #define SP_ADV_EVT                           3
 #define SP_PAIR_STATE_EVT                    4
 #define SP_PASSCODE_EVT                      5
@@ -160,17 +153,6 @@
 
 // Size of string-converted device address ("0xXXXXXXXXXXXX")
 #define SP_ADDR_STR_SIZE     15
-
-// Row numbers for two-button menu
-#define SP_ROW_SEPARATOR_1   (TBM_ROW_APP + 0)
-#define SP_ROW_STATUS_1      (TBM_ROW_APP + 1)
-#define SP_ROW_STATUS_2      (TBM_ROW_APP + 2)
-#define SP_ROW_CONNECTION    (TBM_ROW_APP + 3)
-#define SP_ROW_ADVSTATE      (TBM_ROW_APP + 4)
-#define SP_ROW_RSSI          (TBM_ROW_APP + 5)
-#define SP_ROW_IDA           (TBM_ROW_APP + 6)
-#define SP_ROW_RPA           (TBM_ROW_APP + 7)
-#define SP_ROW_DEBUG         (TBM_ROW_APP + 8)
 
 // For storing the active connections
 #define SP_RSSI_TRACK_CHNLS        1            // Max possible channels can be GAP_BONDINGS_MAX
@@ -247,25 +229,22 @@
 // Connected device information
 typedef struct
 {
-  uint16_t         	    connHandle;                        // Connection Handle
+  uint16_t              connHandle;                        // Connection Handle
   spClockEventData_t*   pParamUpdateEventData;
-  Clock_Struct*    	    pUpdateClock;                      // pointer to clock struct
-  int8_t           	    rssiArr[SP_MAX_RSSI_STORE_DEPTH];
-  uint8_t          	    rssiCntr;
-  int8_t           	    rssiAvg;
-  bool             	    phyCngRq;                          // Set to true if PHY change request is in progress
-  uint8_t          	    currPhy;
-  uint8_t          	    rqPhy;
-  uint8_t          	    phyRqFailCnt;                      // PHY change request count
-  bool             	    isAutoPHYEnable;                   // Flag to indicate auto phy change
+  Clock_Struct*         pUpdateClock;                      // pointer to clock struct
+  int8_t                rssiArr[SP_MAX_RSSI_STORE_DEPTH];
+  uint8_t               rssiCntr;
+  int8_t                rssiAvg;
+  bool                  phyCngRq;                          // Set to true if PHY change request is in progress
+  uint8_t               currPhy;
+  uint8_t               rqPhy;
+  uint8_t               phyRqFailCnt;                      // PHY change request count
+  bool                  isAutoPHYEnable;                   // Flag to indicate auto phy change
 } spConnRec_t;
 
 /*********************************************************************
  * GLOBAL VARIABLES
  */
-
-// Display Interface
-Display_Handle dispHandle = NULL;
 
 // Task configuration
 Task_Struct spTask;
@@ -414,8 +393,6 @@
 static void SimplePeripheral_processPasscode(spPasscodeData_t *pPasscodeData);
 static void SimplePeripheral_charValueChangeCB(uint8_t paramId);
 static status_t SimplePeripheral_enqueueMsg(uint8_t event, void *pData);
-static void SimplePeripheral_keyChangeHandler(uint8 keys);
-static void SimplePeripheral_handleKeys(uint8_t keys);
 static void SimplePeripheral_processCmdCompleteEvt(hciEvt_CmdComplete_t *pMsg);
 static void SimplePeripheral_initPHYRSSIArray(void);
 static void SimplePeripheral_updatePHYStat(uint16_t eventCode, uint8_t *pMsg);
@@ -429,8 +406,6 @@
                                         uint8_t txPhy, uint8_t rxPhy,
                                         uint16_t phyOpts);
 static uint8_t SimplePeripheral_clearConnListEntry(uint16_t connHandle);
-static void SimplePeripheral_menuSwitchCb(tbmMenuObj_t* pMenuObjCurr,
-                                          tbmMenuObj_t* pMenuObjNext);
 static void SimplePeripheral_connEvtCB(Gap_ConnEventRpt_t *pReport);
 static void SimplePeripheral_processConnEvt(Gap_ConnEventRpt_t *pReport);
 #ifdef PTM_MODE
@@ -605,10 +580,8 @@
     uint8_t pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ;
     // Use authenticated pairing: require passcode.
     uint8_t mitm = TRUE;
-    // This device only has display capabilities. Therefore, it will display the
-    // passcode during pairing. However, since the default passcode is being
-    // used, there is no need to display anything.
-    uint8_t ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
+    // This device has no display capabilities.
+    uint8_t ioCap = GAPBOND_IO_CAP_NO_INPUT_NO_OUTPUT;
     // Request bonding (storing long-term keys for re-encryption upon subsequent
     // connections without repairing)
     uint8_t bonding = TRUE;
@@ -681,9 +654,6 @@
   // Initialize GATT Client
   GATT_InitClient();
 
-  // Init key debouncer
-  Board_initKeys(SimplePeripheral_keyChangeHandler);
-
   // Initialize Connection List
   SimplePeripheral_clearConnListEntry(CONNHANDLE_ALL);
 
@@ -692,17 +662,6 @@
 
   // Initialize array to store connection handle and RSSI values
   SimplePeripheral_initPHYRSSIArray();
-
-  // The type of display is configured based on the BOARD_DISPLAY_USE...
-  // preprocessor definitions
-  dispHandle = Display_open(Display_Type_ANY, NULL);
-
-  // Initialize Two-Button Menu module
-  TBM_SET_TITLE(&spMenuMain, "Simple Peripheral");
-  tbm_setItemStatus(&spMenuMain, TBM_ITEM_NONE, TBM_ITEM_ALL);
-
-  tbm_initTwoBtnMenu(dispHandle, &spMenuMain, 2, SimplePeripheral_menuSwitchCb);
-  Display_printf(dispHandle, SP_ROW_SEPARATOR_1, 0, "====================");
 
 }
 
@@ -828,18 +787,6 @@
           {
             case HCI_LE_SET_PHY:
             {
-              if (pMyMsg->cmdStatus == HCI_ERROR_CODE_UNSUPPORTED_REMOTE_FEATURE)
-              {
-                Display_printf(dispHandle, SP_ROW_STATUS_1, 0,
-                        "PHY Change failure, peer does not support this");
-              }
-              else
-              {
-                Display_printf(dispHandle, SP_ROW_STATUS_1, 0,
-                               "PHY Update Status Event: 0x%x",
-                               pMyMsg->cmdStatus);
-              }
-
               SimplePeripheral_updatePHYStat(HCI_LE_SET_PHY, (uint8_t *)pMsg);
               break;
             }
@@ -859,22 +806,6 @@
           // A Phy Update Has Completed or Failed
           if (pPUC->BLEEventCode == HCI_BLE_PHY_UPDATE_COMPLETE_EVENT)
           {
-            if (pPUC->status != SUCCESS)
-            {
-              Display_printf(dispHandle, SP_ROW_STATUS_1, 0,
-                             "PHY Change failure");
-            }
-            else
-            {
-              // Only symmetrical PHY is supported.
-              // rxPhy should be equal to txPhy.
-              Display_printf(dispHandle, SP_ROW_STATUS_2, 0,
-                             "PHY Updated to %s",
-                             (pPUC->rxPhy == PHY_UPDATE_COMPLETE_EVENT_1M) ? "1M" :
-                             (pPUC->rxPhy == PHY_UPDATE_COMPLETE_EVENT_2M) ? "2M" :
-                             (pPUC->rxPhy == PHY_UPDATE_COMPLETE_EVENT_CODED) ? "CODED" : "Unexpected PHY Value");
-            }
-
             SimplePeripheral_updatePHYStat(HCI_BLE_PHY_UPDATE_COMPLETE_EVENT, (uint8_t *)pMsg);
           }
           break;
@@ -943,21 +874,6 @@
  */
 static uint8_t SimplePeripheral_processGATTMsg(gattMsgEvent_t *pMsg)
 {
-  if (pMsg->method == ATT_FLOW_CTRL_VIOLATED_EVENT)
-  {
-    // ATT request-response or indication-confirmation flow control is
-    // violated. All subsequent ATT requests or indications will be dropped.
-    // The app is informed in case it wants to drop the connection.
-
-    // Display the opcode of the message that caused the violation.
-    Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "FC Violated: %d", pMsg->msg.flowCtrlEvt.opcode);
-  }
-  else if (pMsg->method == ATT_MTU_UPDATED_EVENT)
-  {
-    // MTU size updated
-    Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "MTU Size: %d", pMsg->msg.mtuEvt.MTU);
-  }
-
   // Free message payload. Needed only for ATT Protocol messages
   GATT_bm_free(&pMsg->msg, pMsg->method);
 
@@ -982,10 +898,6 @@
   {
     case SP_CHAR_CHANGE_EVT:
       SimplePeripheral_processCharValueChangeEvt(*(uint8_t*)(pMsg->pData));
-      break;
-
-    case SP_KEY_CHANGE_EVT:
-      SimplePeripheral_handleKeys(*(uint8_t*)(pMsg->pData));
       break;
 
     case SP_ADV_EVT:
@@ -1076,8 +988,6 @@
 
         // Set Device Info Service Parameter
         DevInfo_SetParameter(DEVINFO_SYSTEM_ID, DEVINFO_SYSTEM_ID_LEN, systemId);
-
-        Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "Initialized");
 
         // Setup and start Advertising
         // For more information, see the GAP section in the User's Guide:
@@ -1134,15 +1044,6 @@
         // Enable long range advertising for set #2
         status = GapAdv_enable(advHandleLongRange, GAP_ADV_ENABLE_OPTIONS_USE_MAX , 0);
         SIMPLEPERIPHERAL_ASSERT(status == SUCCESS);
-
-#ifdef PTM_MODE
-         // Enable "Enable PTM Mode" option
-         tbm_setItemStatus(&spMenuMain, SP_ITEM_PTM_ENBL, SP_ITEM_NONE);
-#endif
-        // Display device address
-        Display_printf(dispHandle, SP_ROW_IDA, 0, "%s Addr: %s",
-                       (addrMode <= ADDRMODE_RANDOM) ? "Dev" : "ID",
-                       Util_convertBdAddr2Str(pPkt->devAddr));
 
 #if defined(BLE_V42_FEATURES) && (BLE_V42_FEATURES & PRIVACY_1_2_CFG)
         if (addrMode > ADDRMODE_RANDOM)
@@ -1164,22 +1065,12 @@
     {
       gapEstLinkReqEvent_t *pPkt = (gapEstLinkReqEvent_t *)pMsg;
 
-      // Display the amount of current connections
       uint8_t numActive = linkDB_NumActive();
-      Display_printf(dispHandle, SP_ROW_STATUS_2, 0, "Num Conns: %d",
-                     (uint16_t)numActive);
 
       if (pPkt->hdr.status == SUCCESS)
       {
         // Add connection to list and start RSSI
         SimplePeripheral_addConn(pPkt->connectionHandle);
-
-        // Display the address of this connection
-        Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "Connected to %s",
-                       Util_convertBdAddr2Str(pPkt->devAddr));
-
-        // Enable connection selection option
-        tbm_setItemStatus(&spMenuMain, SP_ITEM_SELECT_CONN, TBM_ITEM_NONE);
 
         // Start Periodic Clock.
         Util_startClock(&clkPeriodic);
@@ -1205,11 +1096,7 @@
     {
       gapTerminateLinkEvent_t *pPkt = (gapTerminateLinkEvent_t *)pMsg;
 
-      // Display the amount of current connections
       uint8_t numActive = linkDB_NumActive();
-      Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "Device Disconnected!");
-      Display_printf(dispHandle, SP_ROW_STATUS_2, 0, "Num Conns: %d",
-                     (uint16_t)numActive);
 
       // Remove the connection from the list and disable RSSI if needed
       SimplePeripheral_removeConn(pPkt->connectionHandle);
@@ -1219,17 +1106,11 @@
       {
         // Stop periodic clock
         Util_stopClock(&clkPeriodic);
-
-        // Disable Connection Selection option
-        tbm_setItemStatus(&spMenuMain, TBM_ITEM_NONE, SP_ITEM_SELECT_CONN);
       }
 
       // Start advertising since there is room for more connections
       GapAdv_enable(advHandleLegacy, GAP_ADV_ENABLE_OPTIONS_USE_MAX , 0);
       GapAdv_enable(advHandleLongRange, GAP_ADV_ENABLE_OPTIONS_USE_MAX , 0);
-
-      // Clear remaining lines
-      Display_clearLine(dispHandle, SP_ROW_CONNECTION);
 
       break;
     }
@@ -1271,20 +1152,6 @@
       linkDBInfo_t linkInfo;
       linkDB_GetInfo(pPkt->connectionHandle, &linkInfo);
 
-      if(pPkt->status == SUCCESS)
-      {
-        // Display the address of the connection update
-        Display_printf(dispHandle, SP_ROW_STATUS_2, 0, "Link Param Updated: %s",
-                       Util_convertBdAddr2Str(linkInfo.addr));
-      }
-      else
-      {
-        // Display the address of the connection update failure
-        Display_printf(dispHandle, SP_ROW_STATUS_2, 0,
-                       "Link Param Update Failed 0x%x: %s", pPkt->opcode,
-                       Util_convertBdAddr2Str(linkInfo.addr));
-      }
-
       // Check if there are any queued parameter updates
       spConnHandleEntry_t *connHandleEntry = (spConnHandleEntry_t *)List_get(&paramUpdateList);
       if (connHandleEntry != NULL)
@@ -1300,7 +1167,6 @@
     }
 
     default:
-      Display_clearLines(dispHandle, SP_ROW_STATUS_1, SP_ROW_STATUS_2);
       break;
   }
 }
@@ -1346,14 +1212,10 @@
   {
     case SIMPLEPROFILE_CHAR1:
       SimpleProfile_GetParameter(SIMPLEPROFILE_CHAR1, &newValue);
-
-      Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "Char 1: %d", (uint16_t)newValue);
       break;
 
     case SIMPLEPROFILE_CHAR3:
       SimpleProfile_GetParameter(SIMPLEPROFILE_CHAR3, &newValue);
-
-      Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "Char 3: %d", (uint16_t)newValue);
       break;
 
     default:
@@ -1411,9 +1273,6 @@
 
   if (memcmp(pRpaNew, rpa, B_ADDR_LEN))
   {
-    // If the RPA has changed, update the display
-    Display_printf(dispHandle, SP_ROW_RPA, 0, "RP Addr: %s",
-                   Util_convertBdAddr2Str(pRpaNew));
     memcpy(rpa, pRpaNew, B_ADDR_LEN);
   }
 }
@@ -1456,59 +1315,6 @@
 }
 
 /*********************************************************************
- * @fn      SimplePeripheral_keyChangeHandler
- *
- * @brief   Key event handler function
- *
- * @param   keys - bitmap of pressed keys
- *
- * @return  none
- */
-static void SimplePeripheral_keyChangeHandler(uint8_t keys)
-{
-  uint8_t *pValue = ICall_malloc(sizeof(uint8_t));
-
-  if (pValue)
-  {
-    *pValue = keys;
-
-    if(SimplePeripheral_enqueueMsg(SP_KEY_CHANGE_EVT, pValue) != SUCCESS)
-    {
-      ICall_free(pValue);
-    }
-  }
-}
-
-/*********************************************************************
- * @fn      SimplePeripheral_handleKeys
- *
- * @brief   Handles all key events for this device.
- *
- * @param   keys - bit field for key events. Valid entries:
- *                 KEY_LEFT
- *                 KEY_RIGHT
- */
-static void SimplePeripheral_handleKeys(uint8_t keys)
-{
-  if (keys & KEY_LEFT)
-  {
-    // Check if the key is still pressed. Workaround for possible bouncing.
-    if (PIN_getInputValue(Board_PIN_BUTTON0) == 0)
-    {
-      tbm_buttonLeft();
-    }
-  }
-  else if (keys & KEY_RIGHT)
-  {
-    // Check if the key is still pressed. Workaround for possible bouncing.
-    if (PIN_getInputValue(Board_PIN_BUTTON1) == 0)
-    {
-      tbm_buttonRight();
-    }
-  }
-}
-
-/*********************************************************************
  * @fn      SimplePeripheral_doSetConnPhy
  *
  * @brief   Set PHY preference.
@@ -1534,7 +1340,6 @@
   uint8_t connIndex = SimplePeripheral_getConnIndex(menuConnHandle);
   if (connIndex >= MAX_NUM_BLE_CONNS)
   {
-    Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "Connection handle is not in the connList !!!");
     return FALSE;
   }
 
@@ -1550,9 +1355,6 @@
     SimplePeripheral_stopAutoPhyChange(connList[connIndex].connHandle);
 
     SimplePeripheral_setPhy(menuConnHandle, 0, phy[index], phy[index], 0);
-
-    Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "PHY preference: %s",
-                   TBM_GET_ACTION_DESC(&spMenuConnPhy, index));
   }
   else
   {
@@ -1597,13 +1399,9 @@
   switch (pEventData->event)
   {
     case GAP_EVT_ADV_START_AFTER_ENABLE:
-      Display_printf(dispHandle, SP_ROW_ADVSTATE, 0, "Adv Set %d Enabled",
-                     *(uint8_t *)(pEventData->pBuf));
       break;
 
     case GAP_EVT_ADV_END_AFTER_DISABLE:
-      Display_printf(dispHandle, SP_ROW_ADVSTATE, 0, "Adv Set %d Disabled",
-                     *(uint8_t *)(pEventData->pBuf));
       break;
 
     case GAP_EVT_ADV_START:
@@ -1613,13 +1411,6 @@
       break;
 
     case GAP_EVT_ADV_SET_TERMINATED:
-    {
-#ifndef Display_DISABLE_ALL
-      GapAdv_setTerm_t *advSetTerm = (GapAdv_setTerm_t *)(pEventData->pBuf);
-#endif
-      Display_printf(dispHandle, SP_ROW_ADVSTATE, 0, "Adv Set %d disabled after conn %d",
-                     advSetTerm->handle, advSetTerm->connHandle );
-    }
     break;
 
     case GAP_EVT_SCAN_REQ_RECEIVED:
@@ -1711,45 +1502,19 @@
 static void SimplePeripheral_processPairState(spPairStateData_t *pPairData)
 {
   uint8_t state = pPairData->state;
-  uint8_t status = pPairData->status;
 
   switch (state)
   {
     case GAPBOND_PAIRING_STATE_STARTED:
-      Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Pairing started");
       break;
 
     case GAPBOND_PAIRING_STATE_COMPLETE:
-      if (status == SUCCESS)
-      {
-        Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Pairing success");
-      }
-      else
-      {
-        Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Pairing fail: %d", status);
-      }
       break;
 
     case GAPBOND_PAIRING_STATE_ENCRYPTED:
-      if (status == SUCCESS)
-      {
-        Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Encryption success");
-      }
-      else
-      {
-        Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Encryption failed: %d", status);
-      }
       break;
 
     case GAPBOND_PAIRING_STATE_BOND_SAVED:
-      if (status == SUCCESS)
-      {
-        Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Bond save success");
-      }
-      else
-      {
-        Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Bond save failed: %d", status);
-      }
       break;
 
     default:
@@ -1766,13 +1531,6 @@
  */
 static void SimplePeripheral_processPasscode(spPasscodeData_t *pPasscodeData)
 {
-  // Display passcode to user
-  if (pPasscodeData->uiOutputs != 0)
-  {
-    Display_printf(dispHandle, SP_ROW_CONNECTION, 0, "Passcode: %d",
-                   B_APP_DEFAULT_PASSCODE);
-  }
-
 #if defined(GAP_BOND_MGR)
   // Send passcode response
   GAPBondMgr_PasscodeRsp(pPasscodeData->connHandle , SUCCESS,
@@ -1810,7 +1568,6 @@
 
   if (connIndex >= MAX_NUM_BLE_CONNS)
   {
-    Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "Connection handle is not in the connList !!!");
     return;
   }
 
@@ -1861,16 +1618,6 @@
  */
 bool SimplePeripheral_doSelectConn(uint8_t index)
 {
-  menuConnHandle = connList[index].connHandle;
-
-  // Set the menu title and go to this connection's context
-  TBM_SET_TITLE(&spMenuPerConn, TBM_GET_ACTION_DESC(&spMenuSelectConn, index));
-
-  // Clear non-connection-related message
-  Display_clearLine(dispHandle, SP_ROW_CONNECTION);
-
-  tbm_goTo(&spMenuPerConn);
-
   return (true);
 }
 
@@ -1977,9 +1724,9 @@
     // Get connection index from handle
     connIndex = SimplePeripheral_getConnIndex(connHandle);
     if(connIndex >= MAX_NUM_BLE_CONNS)
-	{
-	  return(bleInvalidRange);
-	}
+  {
+    return(bleInvalidRange);
+  }
   }
 
   // Clear specific handle or all handles
@@ -2088,7 +1835,6 @@
   connIndex = SimplePeripheral_getConnIndex(connHandle);
   if (connIndex >= MAX_NUM_BLE_CONNS)
   {
-    Display_printf(dispHandle, SP_ROW_STATUS_1, 0, "Connection handle is not in the connList !!!");
     return;
   }
 
@@ -2233,22 +1979,12 @@
           } // end of if (connList[index].phyCngRq == FALSE)
         } // end of if (rssi != LL_RSSI_NOT_AVAILABLE)
 
-        Display_printf(dispHandle, SP_ROW_RSSI, 0,
-                       "RSSI:%d dBm, AVG RSSI:%d dBm",
-                       (uint32_t)(rssi),
-                       connList[index].rssiAvg);
-
-	  } // end of if (status == SUCCESS)
+    } // end of if (status == SUCCESS)
       break;
     }
 
     case HCI_LE_READ_PHY:
     {
-      if (status == SUCCESS)
-      {
-        Display_printf(dispHandle, SP_ROW_RSSI + 2, 0, "RXPh: %d, TXPh: %d",
-                       pMsg->pReturnParam[3], pMsg->pReturnParam[4]);
-      }
       break;
     }
 
@@ -2450,81 +2186,6 @@
   } // end of switch (eventCode)
 }
 
-/*********************************************************************
- * @fn      SimplePeripheral_menuSwitchCb
- *
- * @brief   Detect menu context switching
- *
- * @param   pMenuObjCurr - the current menu object
- * @param   pMenuObjNext - the menu object the context is about to switch to
- *
- * @return  none
- */
-static void SimplePeripheral_menuSwitchCb(tbmMenuObj_t* pMenuObjCurr,
-                                       tbmMenuObj_t* pMenuObjNext)
-{
-  uint8_t NUMB_ACTIVE_CONNS = linkDB_NumActive();
-
-  // interested in only the events of
-  // entering scMenuConnect, spMenuSelectConn, and scMenuMain for now
-  if (pMenuObjNext == &spMenuSelectConn)
-  {
-    static uint8_t* pAddrs;
-    uint8_t* pAddrTemp;
-
-    if (pAddrs != NULL)
-    {
-      ICall_free(pAddrs);
-    }
-
-    // Allocate buffer to display addresses
-    pAddrs = ICall_malloc(NUMB_ACTIVE_CONNS * SP_ADDR_STR_SIZE);
-
-    if (pAddrs == NULL)
-    {
-      TBM_SET_NUM_ITEM(&spMenuSelectConn, 0);
-    }
-    else
-    {
-      uint8_t i;
-
-      TBM_SET_NUM_ITEM(&spMenuSelectConn, MAX_NUM_BLE_CONNS);
-
-      pAddrTemp = pAddrs;
-
-      // Add active connection info to the menu object
-      for (i = 0; i < MAX_NUM_BLE_CONNS; i++)
-      {
-        if (connList[i].connHandle != CONNHANDLE_INVALID)
-        {
-          // Get the address from the connection handle
-          linkDBInfo_t linkInfo;
-          linkDB_GetInfo(connList[i].connHandle, &linkInfo);
-          // This connection is active. Set the corresponding menu item with
-          // the address of this connection and enable the item.
-          memcpy(pAddrTemp, Util_convertBdAddr2Str(linkInfo.addr),
-                 SP_ADDR_STR_SIZE);
-          TBM_SET_ACTION_DESC(&spMenuSelectConn, i, pAddrTemp);
-          tbm_setItemStatus(&spMenuSelectConn, (1 << i), SP_ITEM_NONE);
-          pAddrTemp += SP_ADDR_STR_SIZE;
-        }
-        else
-        {
-          // This connection is not active. Disable the corresponding menu item.
-          tbm_setItemStatus(&spMenuSelectConn, SP_ITEM_NONE, (1 << i));
-        }
-      }
-    }
-  }
-  else if (pMenuObjNext == &spMenuMain)
-  {
-    // Now we are not in a specific connection's context
-
-    // Clear connection-related message
-    Display_clearLine(dispHandle, SP_ROW_CONNECTION);
-  }
-}
-
 #ifdef PTM_MODE
 /*********************************************************************
 * @fn      SimplePeripheral_doEnablePTMMode
@@ -2537,14 +2198,6 @@
 */
 bool SimplePeripheral_doEnablePTMMode(uint8_t index)
 {
-  // Clear Display
-  Display_clearLines(dispHandle, 0, 15);
-
-  // Indicate in screen that PTM Mode is initializing
-  Display_printf(dispHandle, 1, 0, "PTM Mode initializing!\n\n\rPlease note UART feed will now stop...");  
-  
-  // Before starting the NPI task close Display driver to make sure there is no shared resource used by both
-  Display_close(dispHandle);
   
   // Start NPI task
   NPITask_createTask(ICALL_SERVICE_CLASS_BLE);
@@ -2564,9 +2217,6 @@
 
   // Inform Stack to Initialize PTM
   HCI_EXT_EnablePTMCmd();
-
-  // Open back the display to avoid crashes to future calls to Display_printf (even though they won't go through until reboot)
-  dispHandle = Display_open(Display_Type_ANY, NULL);
   
   return TRUE;
 }
