ข้อมูลอ้างอิงเกี่ยวกับโครงสร้าง nfc_tag_device
#include <
nfc_tag.h
>
ฟิลด์ข้อมูล |
|
struct hw_device_t | common |
int(* | init )(const struct nfc_tag_device *dev) |
int(* | setContent )(const struct nfc_tag_device *dev, const uint8_t *data, size_t len) |
int(* | getMemorySize )(const struct nfc_tag_device *dev) |
คำอธิบายโดยละเอียด
เอกสารประกอบในสนาม
struct hw_device_t common |
วิธีการทั่วไปของอุปกรณ์แท็ก NFC ข้อมูลนี้ ต้อง เป็นสมาชิกแรกของ nfc_tag_device_t เนื่องจากผู้ใช้โครงสร้างนี้จะแคสต์ hw_device_t ไปยังตัวชี้ nfc_tag_device_t ในบริบทที่ทราบว่า hw_device_t อ้างอิง nfc_tag_device_t
int(* getMemorySize)(const struct nfc_tag_device *dev) |
int(* init)(const struct nfc_tag_device *dev) |
เริ่มต้นใช้งานแท็ก NFC
คนขับรถต้องมีคุณสมบัติดังนี้
- ตั้งค่าไบต์การล็อกแบบคงที่เป็นอ่านอย่างเดียว
- กำหนดค่าคอนเทนเนอร์ความสามารถเพื่อปิดใช้สิทธิ์การเขียน เช่น 0xE1 0x10 <size> 0x0F
ระบบจะเรียกใช้ฟังก์ชันนี้ 1 ครั้งก่อนการเรียกใช้ setContent()
แสดงผล 0 เมื่อสำเร็จหรือ -errno เมื่อเกิดข้อผิดพลาด
int(* setContent)(const struct nfc_tag_device *dev, const uint8_t *data, size_t len) |
เอกสารประกอบสำหรับโครงสร้างนี้สร้างขึ้นจากไฟล์ต่อไปนี้
- hardware/libhardware/include/hardware/ nfc_tag.h