update 1.8
This commit is contained in:
@@ -649,6 +649,24 @@ static void centralEventCB(gapRoleEvent_t *pEvent)
|
||||
}
|
||||
break;
|
||||
|
||||
case GAP_EXT_ADV_DEVICE_INFO_EVENT:
|
||||
{
|
||||
// Display device addr
|
||||
PRINT("Recv ext adv \n");
|
||||
// Add device to list
|
||||
centralAddDeviceInfo(pEvent->deviceExtAdvInfo.addr, pEvent->deviceExtAdvInfo.addrType);
|
||||
}
|
||||
break;
|
||||
|
||||
case GAP_DIRECT_DEVICE_INFO_EVENT:
|
||||
{
|
||||
// Display device addr
|
||||
PRINT("Recv direct adv \n");
|
||||
// Add device to list
|
||||
centralAddDeviceInfo(pEvent->deviceDirectInfo.addr, pEvent->deviceDirectInfo.addrType);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -716,7 +734,7 @@ static void centralPasscodeCB(uint8_t *deviceAddr, uint16_t connectionHandle,
|
||||
// Display passcode to user
|
||||
if(uiOutputs != 0)
|
||||
{
|
||||
PRINT("Passcode:%d\n", (int)passcode);
|
||||
PRINT("Passcode:%06d\n", (int)passcode);
|
||||
}
|
||||
// Send passcode response
|
||||
GAPBondMgr_PasscodeRsp(connectionHandle, SUCCESS, passcode);
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
void NMI_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void HardFault_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void BB_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
void LLE_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||
|
||||
/*********************************************************************
|
||||
* @fn NMI_Handler
|
||||
@@ -60,15 +59,3 @@ void BB_IRQHandler(void)
|
||||
{
|
||||
BB_IRQLibHandler();
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* @fn LLE_IRQHandler
|
||||
*
|
||||
* @brief LLE Interrupt for BLE.
|
||||
*
|
||||
* @return None
|
||||
*/
|
||||
void LLE_IRQHandler(void)
|
||||
{
|
||||
LLE_IRQLibHandler();
|
||||
}
|
||||
|
||||
@@ -166,7 +166,8 @@ static gapRolesCBs_t Peripheral_PeripheralCBs = {
|
||||
// GAP Bond Manager Callbacks
|
||||
static gapBondCBs_t Peripheral_BondMgrCBs = {
|
||||
NULL, // Passcode callback (not used by application)
|
||||
NULL // Pairing / Bonding state Callback (not used by application)
|
||||
NULL, // Pairing / Bonding state Callback (not used by application)
|
||||
NULL // oob callback
|
||||
};
|
||||
|
||||
// Simple GATT Profile Callbacks
|
||||
@@ -210,7 +211,7 @@ void Peripheral_Init()
|
||||
}
|
||||
|
||||
// Set the GAP Characteristics
|
||||
GGS_SetParameter(GGS_DEVICE_NAME_ATT, GAP_DEVICE_NAME_LEN, attDeviceName);
|
||||
GGS_SetParameter(GGS_DEVICE_NAME_ATT, sizeof(attDeviceName), attDeviceName);
|
||||
|
||||
// Set advertising interval
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user