Home | History | Annotate | Download | only in ese_relay
      1 /*
      2  * Copyright (C) 2017 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 /* Pull in NXP PN80T for use in the relay. */
     18 #include <ese/ese.h>
     19 ESE_INCLUDE_HW(ESE_HW_NXP_PN80T_NQ_NCI);
     20 
     21 /* From
     22  * http://stackoverflow.com/questions/27074551/how-to-list-applets-on-jcop-cards
     23  */
     24 static const uint8_t kAtrBytes[] = {
     25     0x3B, 0xF8, 0x13, 0x00, 0x00, 0x81, 0x31, 0xFE, 0x45,
     26     0x4A, 0x43, 0x4F, 0x50, 0x76, 0x32, 0x34, 0x31, 0xB7,
     27 };
     28 const uint8_t *kAtr = &kAtrBytes[0];
     29 const size_t kAtrLength = sizeof(kAtr);
     30 const void *kEseOpenData = NULL;
     31 
     32 void ese_relay_init(struct EseInterface *ese) {
     33   ese_init(ese, ESE_HW_NXP_PN80T_NQ_NCI);
     34 }
     35