Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b783854 authored by Keun Soo Yim's avatar Keun Soo Yim Committed by android-build-merger
Browse files

add nfc vts files and vts profiler build rule am: 6473c646

am: 2dbff5dc

Change-Id: I1438ccb773894c836e936ddb56c2d0ab5eff0e68
parents fa37fc89 2dbff5dc
Loading
Loading
Loading
Loading

nfc/1.0/vts/Android.mk

0 → 100644
+79 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2016 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

LOCAL_PATH := $(call my-dir)

# build profiler for Nfc.
include $(CLEAR_VARS)

LOCAL_MODULE := libvts_profiler_hidl_nfc@1.0

LOCAL_SRC_FILES := \
   Nfc.vts \
   types.vts \

LOCAL_C_INCLUDES += \
  test/vts/drivers/libprofiling \

LOCAL_VTS_MODE := PROFILER

LOCAL_SHARED_LIBRARIES := \
   android.hardware.nfc@1.0 \
   libbase \
   libcutils \
   liblog \
   libhidl \
   libhwbinder \
   libprotobuf-cpp-full \
   libvts_common \
   libvts_multidevice_proto \
   libvts_profiling \
   libutils \

LOCAL_PROTOC_OPTIMIZE_TYPE := full

include $(BUILD_SHARED_LIBRARY)

# build profiler for NfcClientCallback.
include $(CLEAR_VARS)

LOCAL_MODULE := libvts_profiler_hidl_nfc_client_callback_@1.0

LOCAL_SRC_FILES := \
   NfcClientCallback.vts \
   types.vts \

LOCAL_C_INCLUDES += \
  test/vts/drivers/libprofiling \

LOCAL_VTS_MODE := PROFILER

LOCAL_SHARED_LIBRARIES := \
   android.hardware.nfc@1.0 \
   libbase \
   libcutils \
   liblog \
   libhidl \
   libhwbinder \
   libprotobuf-cpp-full \
   libvts_common \
   libvts_multidevice_proto \
   libvts_profiling \
   libutils \

LOCAL_PROTOC_OPTIMIZE_TYPE := full

include $(BUILD_SHARED_LIBRARY)

nfc/1.0/vts/Nfc.vts

0 → 100644
+83 −0
Original line number Diff line number Diff line
component_class: HAL_HIDL
component_type: NFC
component_type_version: 1.0
component_name: "INfc"

package: "android.hardware.nfc"

import: "android.hardware.nfc@1.0::INfcClientCallback"
import: "android.hardware.nfc@1.0::types"

interface: {
  api: {
    name: "open"
    return_type_hidl: {
      type: TYPE_SCALAR
      scalar_type: "int32_t"
    }
    arg: {
      type: TYPE_HIDL_CALLBACK
      predefined_type: "INfcClientCallback"
      is_callback: true
    }
  }

  api: {
    name: "write"
    return_type_hidl: {
      type: TYPE_SCALAR
      scalar_type: "int32_t"
    }
    arg: {
      type: TYPE_STRUCT
      predefined_type: "nfc_data_t"
    }
  }

  api: {
    name: "core_initialized"
    return_type_hidl: {
      type: TYPE_SCALAR
      scalar_type: "int32_t"
    }
    arg: {
      type: TYPE_VECTOR
      vector_value: {
        type: TYPE_SCALAR
        scalar_type: "uint8_t"
      }
    }
  }

  api: {
    name: "pre_discover"
    return_type_hidl: {
      type: TYPE_SCALAR
      scalar_type: "int32_t"
    }
  }

  api: {
    name: "close"
    return_type_hidl: {
      type: TYPE_SCALAR
      scalar_type: "int32_t"
    }
  }

  api: {
    name: "control_granted"
    return_type_hidl: {
      type: TYPE_SCALAR
      scalar_type: "int32_t"
    }
  }

  api: {
    name: "power_cycle"
    return_type_hidl: {
      type: TYPE_SCALAR
      scalar_type: "int32_t"
    }
  }
}
+31 −0
Original line number Diff line number Diff line
component_class: HAL_HIDL
component_type: NFC
component_type_version: 1.0
component_name: "INfcClientCallback"

package: "android.hardware.nfc"

import: "android.hardware.nfc@1.0::types"

interface: {
  api: {
    name: "sendEvent"
    arg: {
      type: TYPE_ENUM
      predefined_type: "nfc_event_t"
    }
    arg: {
      type: TYPE_ENUM
      predefined_type: "nfc_status_t"
    }
  }

  api: {
    name: "sendData"
    arg: {
      type: TYPE_STRUCT
      predefined_type: "nfc_data_t"
      is_const: true
    }
  }
}

nfc/1.0/vts/types.vts

0 → 100644
+87 −0
Original line number Diff line number Diff line
component_class: HAL_HIDL
component_type: NFC
component_type_version: 1.0
component_name: "types"

package: "android.hardware.nfc"


attribute: {
  name: "nfc_event_t"
  type: TYPE_ENUM
  enum_value: {
    scalar_type: "uint32_t"

    enumerator: "HAL_NFC_OPEN_CPLT_EVT"
    scalar_value: {
      uint32_t: 0
    }
    enumerator: "HAL_NFC_CLOSE_CPLT_EVT"
    scalar_value: {
      uint32_t: 1
    }
    enumerator: "HAL_NFC_POST_INIT_CPLT_EVT"
    scalar_value: {
      uint32_t: 2
    }
    enumerator: "HAL_NFC_PRE_DISCOVER_CPLT_EVT"
    scalar_value: {
      uint32_t: 3
    }
    enumerator: "HAL_NFC_REQUEST_CONTROL_EVT"
    scalar_value: {
      uint32_t: 4
    }
    enumerator: "HAL_NFC_RELEASE_CONTROL_EVT"
    scalar_value: {
      uint32_t: 5
    }
    enumerator: "HAL_NFC_ERROR_EVT"
    scalar_value: {
      uint32_t: 6
    }
  }
}

attribute: {
  name: "nfc_status_t"
  type: TYPE_ENUM
  enum_value: {
    scalar_type: "uint32_t"

    enumerator: "HAL_NFC_STATUS_OK"
    scalar_value: {
      uint32_t: 0
    }
    enumerator: "HAL_NFC_STATUS_FAILED"
    scalar_value: {
      uint32_t: 1
    }
    enumerator: "HAL_NFC_STATUS_ERR_TRANSPORT"
    scalar_value: {
      uint32_t: 2
    }
    enumerator: "HAL_NFC_STATUS_ERR_CMD_TIMEOUT"
    scalar_value: {
      uint32_t: 3
    }
    enumerator: "HAL_NFC_STATUS_REFUSED"
    scalar_value: {
      uint32_t: 4
    }
  }
}

attribute: {
  name: "nfc_data_t"
  type: TYPE_STRUCT
  struct_value: {
    name: "data"
    type: TYPE_VECTOR
    vector_value: {
      type: TYPE_SCALAR
      scalar_type: "uint8_t"
    }
  }
}