gap_inquiry.c (ee8a36c87380df634df25f15296b16cad7ff8812) gap_inquiry.c (a4fe6467953bdb173fdf96a604f6527ed88f81c3)
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 235 unchanged lines hidden (view full) ---

244 */
245
246/* LISTING_START(MainConfiguration): Setup packet handler for GAP inquiry */
247int btstack_main(int argc, const char * argv[]);
248int btstack_main(int argc, const char * argv[]) {
249 (void)argc;
250 (void)argv;
251
1/*
2 * Copyright (C) 2014 BlueKitchen GmbH
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright

--- 235 unchanged lines hidden (view full) ---

244 */
245
246/* LISTING_START(MainConfiguration): Setup packet handler for GAP inquiry */
247int btstack_main(int argc, const char * argv[]);
248int btstack_main(int argc, const char * argv[]) {
249 (void)argc;
250 (void)argv;
251
252 hci_event_callback_registration.callback = &packet_handler;
253 hci_add_event_handler(&hci_event_callback_registration);
254
255 // enabled EIR
256 hci_set_inquiry_mode(INQUIRY_MODE_RSSI_AND_EIR);
257
252 // enabled EIR
253 hci_set_inquiry_mode(INQUIRY_MODE_RSSI_AND_EIR);
254
255 hci_event_callback_registration.callback = &packet_handler;
256 hci_add_event_handler(&hci_event_callback_registration);
257
258 // turn on!
259 hci_power_control(HCI_POWER_ON);
260
261 return 0;
262}
263/* LISTING_END */
264/* EXAMPLE_END */
258 // turn on!
259 hci_power_control(HCI_POWER_ON);
260
261 return 0;
262}
263/* LISTING_END */
264/* EXAMPLE_END */