27 Mart 2025'ten itibaren AOSP'yi derlemek ve AOSP'ye katkıda bulunmak için aosp-main
yerine android-latest-release
kullanmanızı öneririz. Daha fazla bilgi için AOSP'de yapılan değişiklikler başlıklı makaleyi inceleyin.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
nfc_tag_device Yapı Referansı
#include <
nfc_tag.h
>
NFC etiketi cihazının yaygın yöntemleri.
Bu yapının kullanıcıları,
hw_device_t
nfc_tag_device_t'ye referans verdiği bilinen bağlamlarda nfc_tag_device_t işaretçisine bir
hw_device_t
kaydeder. Bu nedenle, bu yapının ilk üyesi nfc_tag_device_t olmalıdır.
Tanımı,
nfc_tag.h
dosyasının
51. satırı
içindedir.
NFC etiketini başlatın.
Sürücü:
-
Statik kilit baytlarını salt okunur olarak ayarlama
-
Yazma erişimini devre dışı bırakmak için Yetenek Kapsülü'nü yapılandırın (ör. 0xE1 0x10 <size> 0x0F)
Bu işlev,
setContent()
çağrılarından önce bir kez çağrılır.
Başarılı olduğunda 0, hata oluştuğunda -errno değerini döndürür.
Tanımı,
nfc_tag.h
dosyasının
65. satırı
içindedir.
int(* setContent)(const struct
nfc_tag_device
*dev, const uint8_t *data, size_t len)
|
NFC etiketi içeriğini ayarlayın.
Sürücü, 4. bloğun 0. baytından başlayarak etiketin veri alanına <data> yazmalıdır ve veri alanının geri kalanını sıfırlamalıdır.
Başarılı olduğunda 0, hata oluştuğunda -errno değerini döndürür.
nfc_tag.h
dosyasının
75. satırı
için geçerlidir.
Bu yapının dokümanları aşağıdaki dosyadan oluşturulmuştur:
-
hardware/libhardware/include/hardware/
nfc_tag.h
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 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)"]]