update 1.8
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@ extern "C" {
|
||||
#define CONNECT0_ITEM 0
|
||||
#define CONNECT1_ITEM 1
|
||||
#define CONNECT2_ITEM 2
|
||||
#define CONNECT3_ITEM 3
|
||||
|
||||
/*********************************************************************
|
||||
* MACROS
|
||||
|
||||
@@ -340,10 +340,6 @@ uint16_t Central_ProcessEvent(uint8_t task_id, uint16_t events)
|
||||
{
|
||||
return connect_ProcessEvent(task_id, events);
|
||||
}
|
||||
else if(task_id == centralConnList[CONNECT3_ITEM].taskID)
|
||||
{
|
||||
return connect_ProcessEvent(task_id, events);
|
||||
}
|
||||
// Discard unknown events
|
||||
return 0;
|
||||
}
|
||||
@@ -792,6 +788,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;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ static uint8_t attDeviceName[GAP_DEVICE_NAME_LEN] = "Simple Peripheral";
|
||||
// Connection item list
|
||||
static peripheralConnItem_t peripheralConnList[PERIPHERAL_MAX_CONNECTION];
|
||||
|
||||
static uint8_t peripheralMTU = ATT_MTU_SIZE;
|
||||
static uint16_t peripheralMTU = ATT_MTU_SIZE;
|
||||
/*********************************************************************
|
||||
* LOCAL FUNCTIONS
|
||||
*/
|
||||
@@ -183,7 +183,8 @@ static gapRolesBroadcasterCBs_t Broadcaster_BroadcasterCBs = {
|
||||
// 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
|
||||
@@ -228,7 +229,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);
|
||||
|
||||
{
|
||||
uint16_t advInt = DEFAULT_ADVERTISING_INTERVAL;
|
||||
@@ -554,9 +555,9 @@ static void Peripheral_ProcessGAPMsg(gapRoleEvent_t *pEvent)
|
||||
{
|
||||
case GAP_SCAN_REQUEST_EVENT:
|
||||
{
|
||||
// PRINT("Receive scan req from %x %x %x %x %x %x ..\n", pEvent->scanReqEvt.scannerAddr[0],
|
||||
// pEvent->scanReqEvt.scannerAddr[1], pEvent->scanReqEvt.scannerAddr[2], pEvent->scanReqEvt.scannerAddr[3],
|
||||
// pEvent->scanReqEvt.scannerAddr[4], pEvent->scanReqEvt.scannerAddr[5]);
|
||||
PRINT("Receive scan req from %x %x %x %x %x %x ..\n", pEvent->scanReqEvt.scannerAddr[0],
|
||||
pEvent->scanReqEvt.scannerAddr[1], pEvent->scanReqEvt.scannerAddr[2], pEvent->scanReqEvt.scannerAddr[3],
|
||||
pEvent->scanReqEvt.scannerAddr[4], pEvent->scanReqEvt.scannerAddr[5]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user