1 /* 2 * Copyright (C) 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #include "../includes/common.h" 18 #include "../includes/memutils.h" 19 #include <nfc_int.h> 20 21 #define LENGTH 16 22 23 char enable_selective_overload = ENABLE_NONE; 24 extern tNFC_CB nfc_cb; 25 resp_cback(tNFC_RESPONSE_EVT event,tNFC_RESPONSE * p_data)26static void resp_cback(tNFC_RESPONSE_EVT event, tNFC_RESPONSE* p_data) { 27 (void) event; 28 (void) p_data; 29 } 30 main()31int main() { 32 nfc_cb.p_resp_cback = resp_cback; 33 34 enable_selective_overload = ENABLE_ALL; 35 uint8_t *p_msg = (uint8_t *)malloc(LENGTH); 36 if (!p_msg) { 37 return EXIT_FAILURE; 38 } 39 memset(p_msg, 0x01, LENGTH); 40 41 // Set evt_data.tlv_size 42 *(p_msg + 5) = 200; 43 nfc_ncif_proc_get_routing(p_msg, LENGTH); 44 45 free(p_msg); 46 enable_selective_overload = ENABLE_NONE; 47 return EXIT_SUCCESS; 48 } 49