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

Commit 89d018f3 authored by Steven Moreland's avatar Steven Moreland
Browse files

Adding all nfc vts related things back.

Test: none
Change-Id: I84a42ae27d36a5479f2ca859849bb1b4536bdbad
parent 0ff28200
Loading
Loading
Loading
Loading

nfc/1.0/vts/Android.mk

0 → 100644
+19 −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)

include $(call all-subdir-makefiles)

nfc/1.0/vts/Nfc.vts

0 → 100644
+157 −0
Original line number Diff line number Diff line
component_class: HAL_HIDL
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_ENUM
            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
        }
        arg: {
            type: TYPE_HIDL_CALLBACK
            predefined_type: "INfcClientCallback"
            is_callback: true
        }
        callflow: {
            entry: true
        }
        callflow: {
            next: "write"
            next: "coreInitialized"
            next: "prediscover"
            next: "powerCycle"
            next: "controlGranted"
        }
    }

    api: {
        name: "write"
        return_type_hidl: {
            type: TYPE_SCALAR
            scalar_type: "uint32_t"
        }
        arg: {
            type: TYPE_VECTOR
            vector_value: {
                type: TYPE_SCALAR
                scalar_type: "uint8_t"
            }
        }
        callflow: {
            next: "write"
            next: "prediscover"
            next: "coreInitialized"
            next: "close"
            next: "powerCycle"
            next: "controlGranted"
        }
    }

    api: {
        name: "coreInitialized"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
        }
        arg: {
            type: TYPE_VECTOR
            vector_value: {
                type: TYPE_SCALAR
                scalar_type: "uint8_t"
            }
        }
        callflow: {
            next: "write"
            next: "prediscover"
            next: "close"
        }
    }

    api: {
        name: "prediscover"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
        }
        callflow: {
            next: "write"
            next: "close"
            next: "coreInitialized"
            next: "powerCycle"
            next: "controlGranted"
        }
        callflow: {
            next: "write"
            next: "close"
            next: "coreInitialized"
            next: "powerCycle"
            next: "controlGranted"
        }
    }

    api: {
        name: "close"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
        }
        callflow: {
            exit: true
        }
        callflow: {
            exit: true
        }
    }

    api: {
        name: "controlGranted"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
        }
        callflow: {
            next: "write"
            next: "close"
            next: "prediscover"
            next: "coreInitialized"
            next: "powerCycle"
        }
        callflow: {
            next: "write"
            next: "close"
            next: "prediscover"
            next: "coreInitialized"
            next: "powerCycle"
        }
    }

    api: {
        name: "powerCycle"
        return_type_hidl: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
        }
        callflow: {
            next: "write"
            next: "coreInitialized"
            next: "prediscover"
            next: "controlGranted"
            next: "close"
        }
        callflow: {
            next: "write"
            next: "coreInitialized"
            next: "prediscover"
            next: "controlGranted"
            next: "close"
        }
    }

}
+33 −0
Original line number Diff line number Diff line
component_class: HAL_HIDL
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: "::android::hardware::nfc::V1_0::NfcEvent"
        }
        arg: {
            type: TYPE_ENUM
            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
        }
    }

    api: {
        name: "sendData"
        arg: {
            type: TYPE_VECTOR
            vector_value: {
                type: TYPE_SCALAR
                scalar_type: "uint8_t"
            }
        }
    }

}
+41 −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.
//

cc_test {
    name: "nfc_hidl_hal_test",
    gtest: true,
    srcs: ["nfc_hidl_hal_test.cpp"],
    shared_libs: [
        "libbase",
        "liblog",
        "libcutils",
        "libhidlbase",
        "libhidltransport",
        "libhwbinder",
        "libnativehelper",
        "libutils",
        "android.hardware.nfc@1.0",
    ],
    static_libs: ["libgtest"],
    cflags: [
        "--coverage",
        "-O0",
        "-g",
    ],
    ldflags: [
        "--coverage"
    ]
}
+19 −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)

include $(call all-subdir-makefiles)
Loading