Начиная с 27 марта 2025 г. мы рекомендуем использовать android-latest-release
вместо aosp-main
для создания и участия в AOSP. Дополнительные сведения см. в разделе Изменения в AOSP .
Оптимизируйте свои подборки
Сохраняйте и классифицируйте контент в соответствии со своими настройками.
Справочник по структуре nfc_tag_device
#include < nfc_tag.h >
Определение в строке 44 файла nfc_tag.h .
Общие методы устройства метки NFC. Это должен быть первый член nfc_tag_device_t, поскольку пользователи этой структуры будут приводить указатель hw_device_t к указателю nfc_tag_device_t в контекстах, где известно, что hw_device_t ссылается на nfc_tag_device_t.
Определение в строке 51 файла nfc_tag.h .
Возвращает размер памяти области данных.
Определение в строке 80 файла nfc_tag.h .
Инициализируйте тег NFC.
Водитель обязан:
- Установите байты статической блокировки только для чтения
- Настройте контейнер возможностей для отключения доступа к записи, например: 0xE1 0x10 <размер> 0x0F
Эта функция вызывается один раз перед любым вызовом setContent() .
Возвращает 0 в случае успеха или -errno в случае ошибки.
Определение в строке 65 файла nfc_tag.h .
int(* setContent)(const struct nfc_tag_device *dev, const uint8_t *data, size_t len) |
Установите содержимое тега NFC.
Драйвер должен записать <data> в область данных тега, начиная с байта 0 блока 4, и обнулить остальную часть области данных.
Возвращает 0 в случае успеха или -errno в случае ошибки.
Определение в строке 75 файла nfc_tag.h .
Документация для этой структуры была создана из следующего файла:
- оборудование/libhardware/include/hardware/ nfc_tag.h
Контент и образцы кода на этой странице предоставлены по лицензиям. Java и OpenJDK – это зарегистрированные товарные знаки корпорации Oracle и ее аффилированных лиц.
Последнее обновление: 2025-07-29 UTC.
[[["Прост для понимания","easyToUnderstand","thumb-up"],["Помог мне решить мою проблему","solvedMyProblem","thumb-up"],["Другое","otherUp","thumb-up"]],[["Отсутствует нужная мне информация","missingTheInformationINeed","thumb-down"],["Слишком сложен/слишком много шагов","tooComplicatedTooManySteps","thumb-down"],["Устарел","outOfDate","thumb-down"],["Проблема с переводом текста","translationIssue","thumb-down"],["Проблемы образцов/кода","samplesCodeIssue","thumb-down"],["Другое","otherDown","thumb-down"]],["Последнее обновление: 2025-07-29 UTC."],[],[],null,["# Android Hardware Abstraction Layer: nfc_tag_device Struct Reference\n\nnfc_tag_device Struct Reference\n===============================\n\n[Data Fields](#pub-attribs) \nnfc_tag_device Struct Reference \n\n`\n#include \u003c\n`[nfc_tag.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)`\n\u003e\n`\n\n|----------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Data Fields ----------- ||\n| struct [hw_device_t](/reference/hal/structhw__device__t) | [common](/reference/hal/structnfc__tag__device#a86a0ca82dd3f02023e259b8b5e155dbe) |\n| ||\n| int(\\* | [init](/reference/hal/structnfc__tag__device#ae5eddc2663eab28a5880c1c3ece3c2cd) )(const struct [nfc_tag_device](/reference/hal/structnfc__tag__device) \\*dev) |\n| ||\n| int(\\* | [setContent](/reference/hal/structnfc__tag__device#a33335a1531a79b11436d1272d2ec696b) )(const struct [nfc_tag_device](/reference/hal/structnfc__tag__device) \\*dev, const uint8_t \\*data, size_t len) |\n| ||\n| int(\\* | [getMemorySize](/reference/hal/structnfc__tag__device#a93d3375699112cf6216b01be934f26d1) )(const struct [nfc_tag_device](/reference/hal/structnfc__tag__device) \\*dev) |\n| ||\n\n\nDetailed Description\n--------------------\n\n\nDefinition at line\n[44](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\nof file\n[nfc_tag.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\n.\n\nField Documentation\n-------------------\n\n\n|-----------------------------------------------------------------|\n| struct [hw_device_t](/reference/hal/structhw__device__t) common |\n\n\nCommon methods of the NFC tag device. This\n*must*\nbe the first member of nfc_tag_device_t as users of this structure will cast a\n[hw_device_t](/reference/hal/structhw__device__t)\nto nfc_tag_device_t pointer in contexts where it's known the\n[hw_device_t](/reference/hal/structhw__device__t)\nreferences a nfc_tag_device_t.\n\n\nDefinition at line\n[51](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\nof file\n[nfc_tag.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\n.\n\n|---------------------------------------------------------------------------------------------------|\n| int(\\* getMemorySize)(const struct [nfc_tag_device](/reference/hal/structnfc__tag__device) \\*dev) |\n\n\nReturns the memory size of the data area.\n\n\nDefinition at line\n[80](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\nof file\n[nfc_tag.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\n.\n\n|------------------------------------------------------------------------------------------|\n| int(\\* init)(const struct [nfc_tag_device](/reference/hal/structnfc__tag__device) \\*dev) |\n\n\nInitialize the NFC tag.\n\n\nThe driver must:\n\n- Set the static lock bytes to read only\n- Configure the Capability Container to disable write acess eg: 0xE1 0x10 \\\u003csize\\\u003e 0x0F\n\n\nThis function is called once before any calls to\n[setContent()](/reference/hal/structnfc__tag__device#a33335a1531a79b11436d1272d2ec696b)\n.\n\n\nReturn 0 on success or -errno on error.\n\n\nDefinition at line\n[65](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\nof file\n[nfc_tag.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\n.\n\n|----------------------------------------------------------------------------------------------------------------------------------|\n| int(\\* setContent)(const struct [nfc_tag_device](/reference/hal/structnfc__tag__device) \\*dev, const uint8_t \\*data, size_t len) |\n\n\nSet the NFC tag content.\n\n\nThe driver must write \\\u003cdata\\\u003e in the data area of the tag starting at byte 0 of block 4 and zero the rest of the data area.\n\n\nReturns 0 on success or -errno on error.\n\n\nDefinition at line\n[75](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\nof file\n[nfc_tag.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)\n.\n\n*** ** * ** ***\n\nThe documentation for this struct was generated from the following file:\n\n- hardware/libhardware/include/hardware/ [nfc_tag.h](https://android.googlesource.com/platform/hardware/libhardware/+/master/include/hardware/nfc_tag.h)"]]