panu_demo.c (2fca4dad957cd7b88f4657ed51e89c12615dda72) | panu_demo.c (8c9bb29ec24759ba592d72f79417df812fd8a97f) |
---|---|
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 --- 98 unchanged lines hidden (view full) --- 107 108/* LISTING_START(PanuSetup): Panu setup */ 109static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size); 110static void handle_sdp_client_query_result(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size); 111static void network_send_packet_callback(const uint8_t * packet, uint16_t size); 112 113static void panu_setup(void){ 114 | 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 --- 98 unchanged lines hidden (view full) --- 107 108/* LISTING_START(PanuSetup): Panu setup */ 109static void packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size); 110static void handle_sdp_client_query_result(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size); 111static void network_send_packet_callback(const uint8_t * packet, uint16_t size); 112 113static void panu_setup(void){ 114 |
115 // Initialize L2CAP | 115 // Initialize L2CAP |
116 l2cap_init(); 117 | 116 l2cap_init(); 117 |
118#ifdef ENABLE_BLE 119 // Initialize LE Security Manager. Needed for cross-transport key derivation 120 sm_init(); 121#endif |
|
118 119 // init SDP, create record for PANU and register with SDP 120 sdp_init(); 121 memset(panu_sdp_record, 0, sizeof(panu_sdp_record)); 122 uint16_t network_packet_types[] = { NETWORK_TYPE_IPv4, NETWORK_TYPE_ARP, 0}; // 0 as end of list 123 124 // Initialise BNEP 125 bnep_init(); --- 335 unchanged lines hidden --- | 122 123 // init SDP, create record for PANU and register with SDP 124 sdp_init(); 125 memset(panu_sdp_record, 0, sizeof(panu_sdp_record)); 126 uint16_t network_packet_types[] = { NETWORK_TYPE_IPv4, NETWORK_TYPE_ARP, 0}; // 0 as end of list 127 128 // Initialise BNEP 129 bnep_init(); --- 335 unchanged lines hidden --- |