| поискавой системы для электроныых деталей |
|
PM0237 датащи(PDF) 60 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0237 датащи(HTML) 60 Page - STMicroelectronics |
|
60 / 88 page ![]() Design an application using BlueNRG, BlueNRG-MS ACI APIs PM0237 60/88 DocID027104 Rev 2 /* Start the general discovery procedure (active scan) using the following parameters: Scan_Interval: 0x4000; Scan_Window: 0x4000; Own_address_type: 0x00 (public device address); filterDuplicates: 0x00 (duplicate filtering disabled); ret = aci_gap_start_general_discovery_proc(0x4000, 0x4000,0x00,0x00); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} } The responses of the procedure are given through the EVT_BLUE_GAP_DEVICE_FOUND (BlueNRG) and EVT_LE_ADVERTISING_REPORT (BlueNRG-MS) events raised on HCI_Event_CB() callback (EVT_VENDOR as main event) . The end of the procedure is indicated by EVT_BLUE_GAP_PROCEDURE_COMPLETE event on the HCI_Event_CB() callback (EVT_VENDOR as main event): void HCI_Event_CB(void *pckt) { hci_uart_pckt *hci_pckt = pckt; hci_event_pckt *event_pckt = (hci_event_pckt*)hci_pckt->data; if(hci_pckt->type != HCI_EVENT_PKT return; switch(event_pckt->evt){ case EVT_VENDOR: { /* Get the vendor event data */ evt_blue_aci *blue_evt = (void*)event_pckt->data; switch(blue_evt->ecode){ case EVT_BLUE_GAP_DEVICE_FOUND: { evt_gap_device_found *pr = (void*)blue_evt->data; /* evt_gap_device_found parameters: pr->evt_type: event type (advertising packets types); pr->bdaddr_type: type of the peer address (PUBLIC_ADDR,RANDOM_ADDR); pr->bdaddr: address of the peer device found during scanning; pr->length: length of advertising or scan response data; pr->data_RSSI[]: length advertising or scan response data + RSSI. RSSI is last octect (signed integer). */ /* Add user code for decoding the evt_gap_device_found event data based on the specific pr->evt_type (ADV_IND, SCAN_RSP, ..)*/ ……… }/* EVT_BLUE_GAP_DEVICE_FOUND */ break; case EVT_BLUE_GAP_PROCEDURE_COMPLETE: { /* When the general discovery procedure is terminated |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |